CAN Info Get

This MotoHawk™ block recovers the requested information from the referenced CAN Definition block.

Block ID

CAN Info Get

Library

MotoHawk_lib/CAN Blocks

Description

This MotoHawk™ block recovers the requested information from the referenced CAN Definition block.

The block allows multiple attributes to be selected. Whether an attribute is supported depends upon the referenced CAN Definition block. Attributes that are not supported will return a value of 0 and will marked as Unsupported on the block.

Block Parameters

Parameter Field Values Comments/Description
Reference Name Alpha-numeric text, single-quote enclosed Name of the CAN Definition block whose attributes are to be recovered.
Unsupported Method Treatment Dropdown Specify how the block should behave when an unsupported method is encountered.
Unsupported Method Treatment Setting Edit A value of 'Ignore', 'Warn' or 'Error'. Typically used when a workspace variable is to supply the setting. Only visible when "Specify via Edit Dialog" has been selected by the Unsupported Method Treatment drop down.
Method Visibility Filter Dropdown Provides options to filter (hide) methods that are not applicable to a particular filter setting.

The filter is used to assist the developer in selecting related attributes and does not impact code generation.
Hide Unsupported Methods Checkbox Unsupported methods won't be displayed on the mask when checked. A checked method will still be implemented.

The checkbox is used to assist the developer in selecting attributes that are supported and does not impact code generation.
Bus State Check to populate method on the block Equivalent to CAN Fault Status Get.
SW Receive/Transmit Queue Size Check to populate method on the block The total size of the selected software queue. Value corresponds to the queue size specified by the referenced CAN Definition block.
SW Receive/Transmit Queue Depth Check to populate method on the block The current depth (number of unprocessed entries) in the selected software queue.
SW Receive/Transmit Queue Max Depth Check to populate method on the block The maximum depth observed in the selected software queue since it was reset.
SW Receive/Transmit Queue Max Depth (reset on read) Check to populate method on the block The same as SW Queue Max Depth except the value is reset by side effect after reading.

For example, if the maximum queue depth observed was (say) 10 CAN frames, then the method would return 10, but this value would then be reset to zero. A subsequent read of Max Depth would return zero if no further CAN frames had since been queued.
SW Receive/Transmit Queue Overrun Check to populate method on the block Overrun occurs if a CAN frame is not able to be queued because the queue is already full. This status is latched and only clears when read (to allow a subsequent condition to be observed).
Processed Frames/sec Check to populate method on the block The rate at which received frames (those that are added to the SW receive queue) have been processed in frames/second.
Max Processed Frames/sec Check to populate method on the block The maximum observed rate at which received frames (those that are added to the SW receive queue) have been processed in frames/second since it was reset.
Max Processed Frames/Sec (reset on read) Check to populate method on the block The same as Max Processed Frames/sec except the value is reset by side effect after reading.

For example, if the maximum processed frame rate was (say) 1000 CAN frames/second, then the method would return 1000, but this value would then be reset to zero. A subsequent read would return zero if the frame rate had not been updated (which only occurs periodically when the execution timeslice expires).
Bus Load - Processed Bits/Sec Check to populate method on the block A measure of processed bus load. Any data sent or received on the referenced CAN bus is measured. A hardware filter that rejects the receipt of a frame because of its ID is not measured. Thus the measured Bus Load will representative of the actual Bus Load when there is no hardware filering of receieved messages. The measure is only representative because bits such as stuff bits are not counted.

Processed bus load as a percentage of available bus bandwidth could be calculated using this value multiplied by 100 and divided the the baud rate returned from the CAN Baud Rate Status block.
Bus Load - Max Processed Bits/Sec Check to populate method on the block The maximum observed processed bus load since it was reset.
Bus Load - Max Processed Bits/Sec (reset on read) Check to populate method on the block The same as Max Processed Bits/sec except the value is reset by side effect after reading.

For example, if the maximum processed frame rate was (say) 10000 Bits/sec (bps), then the method would return 10000, but this value would then be reset to zero. A subsequent read would return zero if the bit rate had not been updated (which only occurs periodically when the execution timeslice expires).