Discussion:
CAN Write (Wfm) looses the last few samples
(too old to reply)
hurban
2007-09-11 09:40:26 UTC
Permalink
Hi all,
 
it seems I have a silly little bug here in NI-CAN 2.3.3:
 
If I run the original NI CAN example "Waveform Output.vi" on my RT-Target, it always looses a few samples i.e. when I stop the loop by pressing "Stop" the last value that is sent is not #99 but #95 if I remember correctly.
 
Luckily there is an easy workaround: place a "Wait 1000ms" between the end of the loop and the "Clear Task" but frankly- I don't think this is the way it is intended to work ;-)  Has this issue already been solved in newer versions of CAN ?
 
Background: my customer uses CAN to test mechanical actuators and whenever the test finished, the actuator remained in a "non-zero" position, which of course is quite annoying :-(
 
Thanks for any feedback
 
HU
 
DirkW
2007-09-11 14:40:07 UTC
Permalink
Hi HU,
I guess you mean the channel api example? Unfortunately there is no wait for transmit complete available. That means you have to use the wait as you did.
Perhaps you could use the Frame api write multiple function instead? The Frame api offers such a wait for transmit complete. Thus the close or clear would not stop your transmit because it is closing the handle.
DirkW
hurban
2007-09-11 15:10:15 UTC
Permalink
Hi Dirk,
yes, I am using the channel API. So it seems I will have to have a look into the Frame API sooner or later.
Anyway I think this behaviour could/should be fixed in the channel API.
Thanks for the good hint HU

Loading...