03-28-2007 02:53 PM
03-28-2007 08:35 PM
03-29-2007 06:28 AM
Hi
Sorry, Im new in programming
Im using labview 6.0. As I mentioned, I have two Pc linked by a serial port that run independant system. I want to synchronise them. But one pc is only reading i have no access to the software of this one. So I have only posible action on one pc, from where I want to send a pulse or a marker.
First Is it possible to create a pulse in labview and to transmit it to the serial port?
Secondly, How make sure that the second PC has received the message, if I used the action Read from the PC 1, is that correct that i ll read what I wrote on the PC2 or not. How to get the exact time at which the pulse was received by the PC2?
Thanks
03-29-2007 08:24 AM
I already told you how to send a pulse. It is with VISA. Drop a VISA property node on the block diagram, right click on it and select Properties>Serial Seettings>Modem Line Settings>Line RTS State. Right click on the property again and select Change to Write. Right click on the input and select Create Constant. The constant value is either Unknown, Asserted, or Unasserted. At the other pc, you will have to have a VI running that monitors the CTS line with a similar property node.
I'm not sure I understand your comment about "one pc is only reading i have no access to the software of this one". If you can't install a LabVIEW program on this pc, then it won't do any good to send a pulse from the other pc. The only way the sending pc would know that the receiving pc got the pulse would be for it to have software running there and send back an acknowledgement that it was received. If you want to send messages back and fort, then you don't have have to do any of this stuff with the control lines. Just send a defined message from pc 1 to pc 2 with a VISA Write. On pc 2, do a continuous check for bytes at the serial port and when the byte count is greater than zero, read the bytes and check to see if the message is valid. You wound then send a message back to pc 1, saying 'message received'. You could inlcude a timestamp in the message. 'Exact' time on a pc is a nebulous term. It's not much more accurate than 10's of milliseconds.
03-29-2007 03:51 PM
03-29-2007 04:19 PM