01-21-2012 03:20 AM
Hello everyone...
Please explain me what is TIMEOUT in serial communication. By my knowledge it is time required to receive a reply from port after transmitting a querry. M using basic serial read write example in which timeout mentioned is 10 sec. I am very much sure that after sending a querry to my unit, it responds in 3sec but still m not getting the proper output at the read side with the timeout of 10sec..
Please help me out with this.
Thanks & Regards,
Manisha
01-21-2012 03:30 AM
You are right in your assumption about timeout.
But did you specify the correct endcharacter, have the correct cable (yes or no twisting), did you enable the endcharacter or does your hardware als need some other hardware signals before replying?
You could use NI-IOtrace to see whatt really happens on the serial line.
01-21-2012 04:17 AM
Hii Ablert,
Thanks for quick reply.
M not using any end character for my communication. M getting proper data using hyper. Is there any way to to specify number of bytes to be read after write operation? Or after sending a querry, can I put a timer which gives me time taken for reading operation?
Thanks & Regards,
Manisha
01-21-2012 04:35 AM
Hi
If you ook at the block diagram you see the open, then the write followed by a wait (the value in ms in lower left of front panel)
Then a check on how many bytes are available and then the read followed by a close.
Everything between the initialize and the close could be put in a while as is also done in the advanced serial write and read.
I would try that example first.
01-21-2012 05:02 AM
M attaching one VI in which m waiting for timeout to complete after sending a querry. In this I have used sequence structure in order to reduce error. M using while loop for checking the reply time. After sending a querry m waiting for 6 while loop to check whether reply has come or not? Is it a write way to check timeout???
01-23-2012 01:10 AM
Hey I got sumthing. My unit is in half duplex mode. What is the exact differance in half n full duplex in labview? Any modification is required? If yes pls suggest me the changes should be made in basic serial read write example?
Please help me out with this.
Thanks & Regards,
Manisha
01-23-2012 01:38 PM
half duplex is normal,it only menas that your device is either receiving or sending not at the same time.
full duplex is also normal meaning the device can send and receive at the same time.
Your sequence frame added does nothing in LabVIEW except for the single frame around the wait ms, that is a correct frame because it has no error in/error out.
In fact Everything that is connected by wire in LabVIEW is executed in that order. This is called sequencing by wiring !
And for IO it is very nice.
But did you already look at the advanced serail read and write.
01-23-2012 01:38 PM
half duplex is normal,it only menas that your device is either receiving or sending not at the same time.
full duplex is also normal meaning the device can send and receive at the same time.
Your sequence frame added does nothing in LabVIEW except for the single frame around the wait ms, that is a correct frame because it has no error in/error out.
In fact Everything that is connected by wire in LabVIEW is executed in that order. This is called sequencing by wiring !
And for IO it is very nice.
But did you already look at the advanced serail read and write.