Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

How to synchronize readings of RS232 (instr assist vi) & reads of DAQ assist vi

Hi,
 
I need readings from RS232 and DAQ channels at the same time,  how can I do that?
I get one reading from RS232 through Instrument assistant.vi, and another three readings from DAQ channels via DAQ assistant.vi, but when I just continously read all of them, I found that after I pool all of 4 them together, three readings from DAQ channels are at the same time (1ms interval), however, the other reading fromRS232 only shows once at 100ms. I am wondering (1)whether three readings from DAQ and the reading from RS232 are collected at the same time or not, if at 100ms interval? (2) Can we increase the sample rate(100ms a data may not be enough for my application) if they are measured at the same time?
 
(FYI, The device I connected to RS232 is Sony digitizer, which has baud rate of 2400bps, data bit length: 8 bits)
Attached is my Labview program and the collect data sample with all the hardware working properly. Anyone can provide me some suggestions or solutions will be highly appreciated!
 
Sincerely yours,
Shuping
 
 
 
0 Kudos
Message 1 of 5
(3,673 Views)

sync: The only way to do it would be to use a shared signal (mostly a trigger signal) that goes to both devices.

speed: 2400 baud will allow you to send round about 240 bytes of information per second. If you really have already a 100ms update rate you have reached the limit. However RTFM, maybe you can speed up you digitizer.

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 5
(3,664 Views)

I think a big part of your problem is with the 2D array that you are creating. Why do you do this? The result from the DAQ Assistant is basicially a 1D array and if you want the results from the RS-232 read, it should also be a 1D array.

I think this is a classic example of what can go wrong with dynamic data. The dynamic data type really acts to hide the underlying details and the conversion from and to dynamic data can really confuse things.

0 Kudos
Message 3 of 5
(3,654 Views)
Thanks, Henrik.
 
I think the suggestion you mentioned is quite reasonable. However, I just started Labview programming a few weeks and I don't know how to do it. How can I wire a trigger signal (say, true or false ) to control the instrument assistant vi. and DAQ assist.vi at the same time? Could you show me some simple Labview examples and provide me more guidance? Great Thanks.
 
Greetings from Hong Kong.
 
Sincerely yours,
Shuping
0 Kudos
Message 4 of 5
(3,634 Views)
I believe Henrik is talking about a physical trigger signal and not anything in software. Just how synchronous do you need the RS232 and DAQ. The software technique you have now is probably starting the instrument I/O assistant and the DAQ read within a couple milliseconds at most.
0 Kudos
Message 5 of 5
(3,624 Views)