01-07-2013 07:46 AM
I want to control a number of LEDs on a LIN bus. I am using the USB-8476 to interface the network. I need to send 6 messages to six LEDs to set their individual colors, and then send 6 new messages to make it appear the colors are moving down the line, one at a time. I can't get the timing right, so I reduced the network to just two LEDs. The messages are sent in a Timed Sequence of two frames, and that is inside a While Loop. I have tried various combinations of Configured Time Sequence and Next Frame Timing, as well as various Wait Timers inside the While Loop, but I can't get anything remotely close to steady timing.
01-08-2013 09:21 AM
Define "steady timing".
Assuming you are running this code on a Windows system there will always be some variability in timing because Windows is not a deterministic OS, and using timed loops won't help that...
Mike...
01-08-2013 09:55 AM
You may have better luck with an XNET LIN interface, which does onboard scheduing of message.
01-09-2013 07:05 PM
Thanks for your replies. I had some help from an AE at NI who explained I don't need the timed sequences unless I am using RT systems, so after scrapping all the timed sequences and loops, and just putting all the frames sends together with a small delay inside each case, everything works pretty good now. Amazing how well this works once you see the correct way to code it! Now if I can just figure out the build executable function, I will be successful.