From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing multiple CAN msgs based on timings

Hello,

          My requirement is to send multiple CAN msgs on the bus. The situation is that i need to have a queue structure wherein based on my sequence ill update the CAN msg that has to be sent either periodic or once. If periodic the msg will be sent once in x milliseconds, x is the cycle of the message. If its an event message it will be sent only once.  Also i need to have a timer which will automatically add the periodic message in the queue once in x millisec. How can i implement this in Labview? What are all the things that i shouldnt do. Any suggestions are welcome.

 

Regards

Jay

0 Kudos
Message 1 of 2
(2,615 Views)

Hello,

 

I am a little bit unsure about how you would like your final project to function, but from what I see here, you need to be able to switch between periodic and single messages on the fly. In order to start off with the CAN functionality in LabVIEW, you can start off with some example programs. The CAN examples can be found by going to Help >> Find Examples, and then following the folder path below.

 

Hardware Input & Output >> CAN >> NI-CAN >> Channel API >> Basic >> Single Sample Event Output.vi

 

Usually, you can set up a message to be either periodic or event (single time). There is no defined functionality in order to easily switch between the two. The best thing that I can suggest would be to use the event functionality, and programmatically control the VI to send the single events at a periodic rate for periodic messages, and a single time for event messages.

 

The above is useful if you are using NI-CAN. If you are using NI-XNET, it becomes pretty different. If you would like some more steps or in depth help, then could we know what devices you are using as well as whether or not you are using NI-CAN or NI-XNET?

 

Best,

Shamik Chakraborty
Applications Engineer
National Instruments
http://www.ni.com/support

0 Kudos
Message 2 of 2
(2,575 Views)