08-19-2020 03:57 PM
I Have a Frame that I am trying to brake up
The Frame contains an Array containing: Time stamp, 64 bit pay load, CAN ID, Type and if extended.
I Need to extract just the 64 bit pay load but am not finding a good way to do it.
The 64 bit pay load contains 2 32 bit IEEE 745 floating point numbers.
I am using the example CAN FRAME INPUT STREAM.VI with data coming from a TI. Launch pad.
It is generating all the required data
I have tried some of the ARRAY icons ARRAY SUBSET etc without any luck.
Anyone got a good idea
08-19-2020 04:19 PM - edited 08-19-2020 04:20 PM
Here's an example of a CAN bus "sniffer" I write for a Toshiba Lithium Battery pack. It should give you an idea of how to do it...
08-19-2020 04:33 PM
Thanks for the VI
The Bus is being handled by an NI-USB8502 which uses NI-XNET.
I found that I am having a little luck using the Delete From Array Icon then use the deleted output.
Next I need to split up the pay load into 2 32 bit binary sections.
08-20-2020 01:22 AM - edited 08-20-2020 02:04 AM
Hi John,
john@crane wrote:
Next I need to split up the pay load into 2 32 bit binary sections.
So the payload contains 8 bytes and you want to create 2 numbers from it.
Are those numbers integers, FXP or SGL entities? (SGL because of your other thread where you also forgot to provide useful information.)
You may use UnflattenFromString:
(You may also use a typedefined cluster instead of the SGL array constant…)