LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can Communication lag

Hello Gerdw,

 

Please find attached the the part of code which is reading data.I can not share the log files which I have taken as logs contains data that is confidential.

Thanks in advance 🙂

 

0 Kudos
Message 11 of 14
(857 Views)

Hi prajakta,

 

  • doing file operations, especially writing XLSX files, will slow down your main loop: use a consumer-producer scheme to decouple the process "CAN read" from "write data to file"…
  • at 250kBaud you should receive less than ~2000 messages per second: the producer-consumer should handle that very well…
  • when checking the ID you don't need to convert to a string. Just use an AND function to mask some bits and compare with an I32 value!
  • don't use ExpressVIs for writng files, use plain file functions to improve execution speed…
  • using a device driver with an enum item "standart" looks very suspicious to me…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 14
(851 Views)

Thanks for Quick Reply 🙂

I will try to implement the consumer producer scheme for CAN read.

I used the express VI for creating binary files (.tdms) whose writing speed is much higher than normal .xlsx file.Though I will implement basic File I/O operations to improve speed.

Enum 'standart' will select message type for CAN communication standard/extended.

 

Thank you so much again 🙂

0 Kudos
Message 13 of 14
(841 Views)

Hello Prajatka,

 

Do you also have the other VI files of you CAN_Read.vi namely PCAN_INIT.vi and PCAN_READ.vi, PCAN_CLOSE.vi ? If so, can you please upload them here so I can start testing your main CAN_Read.vi ? Thanks! Mihai.

0 Kudos
Message 14 of 14
(720 Views)