![]() |
|
|
Introduction
To use the CAN Frame Channel conversion Library with Extended Arbitration IDs it is necessary to modify the Arbitration ID that is sent to the Frame ncWriteNetMulti.VI. The ARB ID must be modified so that the Channel API can handle the extended arbitration ID appropriately. In the case of the USBCANInput example program we read a CAN Frame from the bus using the Frame API. The Arbitration ID has been Flagged as an extended Arbitration ID - the 32nd bit of the ARB ID has been set to true by ORing the ARB ID with 0x20000000 in the USBCANOuput example program. It is now necessary to undo this by ANDing the ARB ID with 0x1FFFFFFF. This "new" ARB ID can now be passed to the Convert Frame to Channel.VI.
Steps to Complete
To use extended Arbitration IDs with the frame API it is necessary to perform some boolean arithmatic. It this case it is necessary to AND the extended ARB ID - coming for the Frame API - with 0x1FFFFFFF. This ends up flipping the 32nd bit from a 1 to 0 indicating to the CAN driver that it needs to handle an extended arbitration ID appropriately.
There are no comments on this document