LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I synchronize two serial ports?

I want to start two devices via serial port (RS232) synchroniously within a few microseconds(or even with an constant time delay).
Therefore I send a carriage return to com1 and com2 using two serialwrite.vi within one case loop.
But it seems that the time delay between the both carriage returns ar sent is sometimes longer, sometimes shorter.
(The reason might also be that Windows NT is no realtime-system.)
I there any possibility to trigger both serial ports, so that the carriage returns are sent with an constant time delay?
0 Kudos
Message 1 of 3
(3,379 Views)
rainer writes:

> I want to start two devices via serial port (RS232) synchroniously
> within a few microseconds(or even with an constant time delay).
> Therefore I send a carriage return to com1 and com2 using two
> serialwrite.vi within one case loop.
> But it seems that the time delay between the both carriage returns ar
> sent is sometimes longer, sometimes shorter.
> (The reason might also be that Windows NT is no realtime-system.)
> I there any possibility to trigger both serial ports, so that the
> carriage returns are sent with an constant time delay?

Rainer,

have you thought about using just one serial port? If your devices
have some form of address and you don't use handshaking, you can wire
a few devices in parallel.

Other ideas are c
onverters to from pc to RS485 (which is multidrop)
and 2 converters (with their own adress) back to RS232.

I always recommend using VISA for serial I/O. I assume that you have
some form of data dependency and delay between the serial writes.

Johannes Nieß
0 Kudos
Message 2 of 3
(3,379 Views)
Thank you Johannes,

My devices have no Adress, so it doesn't work with one port.
It's an old x/y-Table-controller and a custom made printhead controller. I'm setting up a printing station for testing special inks.
But I think you are right with VISA.
I just hesitated to use it because I have no clou how it works and if it works with my devices.
Do you know were I can get information (maybe in the Internet) about VISA that even a bloody beginner like I can understand?

Rainer
0 Kudos
Message 3 of 3
(3,379 Views)