LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

RS232 data communication

Hi All,

I am trying to read the data from a hardware, which transmits 5 data packets/sec and 1 packet=4 bytes, through RS232 to PC. RS232 baud rate=2400 bps. 1st byte is a 'START OF DATA' marker (set as =65). Next 3 bytes are then processed and calculated 'TOF' is being saved in a file. Every 30 min  file name is being changed. 

 

Now problem is as this :- I should receive 5x60x30 number of data points (TOF) in each 30 min , But in real I am receiving variable number of data points for each 30 min data file.

 

Please go through enclosed VI and suggest.

 

 

 

Pl note: I am using workstation with dual core processor and 4GB memory.

jayant
0 Kudos
Message 1 of 2
(2,329 Views)

I don't typically use occurrences but I think you may have a bit of a timing issue with your parallel loops and your stop button.

 

I think I'd ditch the stacked sequence in your consumer loop and pull your file write into your consumer.

 

Your end logic for writing the Stop local doesn't make a lot of sense.  If you make it to those comparison functions, then all of your loops have been stopped and there should be no need to set the local.

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