01-16-2012 03:30 AM
Hallo,
I also have problem regarding reading command frame through the modem with RS232 cable .
the problem is I am making a software which reads a data from telemetry and have 2 command frame and as soon I received perfect command frame I have to reply with status frame.
I have define all protocol and there is a communication but not in a smooth manner I tried to search shot out by searching 1st character for e.g.: it started with FFFF.........................................................................AAAA 0000 FFFF..................................................................AAAA 0000 command frame looks like this way in total 84 bytes.
some time I get a perfect one and some time it missed the data.although I am giving visa read 84 bytes the frame is incomplete.
when I get a prefer command frame there is communication now the problem is the command frame after certain time it is incomplete i.e., normally it should be 84 bytes but after some time it shifted I don't know how to solve this problem It would be nice if anyone help me out
thanking you.
Solved! Go to Solution.
01-16-2012 08:55 AM
Please show us some code. Did you configure the VISA session to turn off the option to have VISA Read automatically end a read when it sees a specific character? It's an input to the VISA Configure Serial Port.
01-17-2012 02:46 AM
Hello,
If you now notice that the instrument responds only after a second execution of the write command, increase the delay before read (ms) input to ensure that the write has time to complete before reading.
For more information please go to: Serial VISA Read Cuts Off My Data Before It Reads the Requested Number of Bytes.
Houssam Eddine Kassri
NI Germany
01-17-2012 03:10 AM - last edited on 01-17-2012 04:39 PM by JordanG
Thanks for reply.
Here I have attach my sub.vi ,you may find out the problem.
thanking you
01-17-2012 07:51 AM
Your code is illegible. I need a monitor the size of Texas to look at it. My hand developed cramps from all of the scrolling.
01-17-2012 08:44 AM - last edited on 01-17-2012 04:38 PM by JordanG
I am sorry its all because of auto grow . I have attach again same vi but now it can be readable.
thanking you.
01-17-2012 10:44 AM
Interesting way to implement hadware handshaking-
change Flow to "Hardware" in the serial port initialize and start again. On your next attempt keep a few things in mind:
01-17-2012 03:55 PM
Thanks Jeff Bohrer
you mean I should remove sequence frame and replace wait with time delay??????
best regards
01-17-2012 05:02 PM
@kalu wrote:
Thanks Jeff Bohrer
you mean I should remove sequence frame and replace wait with time delay??????
best regards
That and stop playing with CTS-RTS hardware flow control will do it for you
01-19-2012 06:37 AM
Hallo
thanks for all your suggestion now there is a communication but in the starting it takes too too much time to get the valid frame and after some second it gets then communication last for 20-25 minutes . After that automatically communication lost and I have to rerun the program for communication
what might be the reason I have default my terminating character and there is enough visa time out (1000).
Hope to get a perfect solution
thanking you