Discussion:
Recording Serial Port Data Problems
(too old to reply)
drfunkphd
2008-08-07 23:10:05 UTC
Permalink
I am trying to run a VI that allows me to retrieve data from two different serial ports.  When I do this, I use an array to compile the data from these different sources.  When the array is compiled, occasionally one of the data sources is not read correctly.  This results in the array not recording the desired data.  I have tried using waits and different sample rates in order to sync up these sources so they would record harmoniously.  I am limited to the hardware sample rates, which only has two settings.  I have attached a copy of my code (in version 8.5). I know it may not help much, as there's no hardware to read from.   Sorry for the messy VI, but its more of a reference.  Do you have any ideas on how to get around this problem?  Thank you.Message Edited by drfunkphd on 08-07-2008 05:45 PM


Record Power and Pressure 4.vi:
http://forums.ni.com/attachments/ni/170/347710/1/Record Power and Pressure 4.vi
Ravens Fan
2008-08-08 03:40:05 UTC
Permalink
This post might be inappropriate. Click to display it.
Ipshita_C
2008-08-08 21:10:08 UTC
Permalink
Hi drfunkphd,
 
Ravens Fan is rihgt. you need to clean up the code. The next thing I would suggest is that for the read and write to occur sequentially, you have to put them in non-parallel structures using either a flat sequence or two loops using a producer-consumer architecture. For more reference on the producer-consumer architecture please look at <a href="http://zone.ni.com/devzone/cda/tut/p/id/3023" target="_blank">this</a> link. Hope this helps.
&nbsp;
Ipshita C.
drfunkphd
2008-08-11 19:10:07 UTC
Permalink
Hi guys, Thanks for the help.&nbsp; The sequential structure worked very well.&nbsp; And in the future I'll be sure to make the VI's a bit more legible before posting them.&nbsp; Thanks again. - Dan
Continue reading on narkive:
Loading...