08-28-2012 12:29 PM
Hello,
I'm using NI-9870 and cRIO-9074 for serial communication with a outer module (Mesytec MRC-1).
I got the example "NI 9870 Continuous Serial Read On-Demand Write.lvproj " and managed run the programs.
I didn't change the example anywhere.
However, when I tried to write commands in order to read some status of MRC-1,
the response was the same as what I send.
This is strange.
For example, when I write "RE 0 0 4" to the module, I get "RE 0 0 4".
The correct response should be "RE 0 0 4 0".
When I connected to the MRC-1 directly from a PC by PUTTY, I got the correct response "RE 0 0 4 0".
Could you help me and tell the reason why I can't get the correct response?
08-31-2012 07:33 AM
Hello Tatsuya.F
This Muhammad Waqas from National Isntruments Japan.
I will be assisting you with you question.
1)How about the Baud rate you are using?
2)Can you please test by writing "RE 0 0 4 " with space after 4.
3)Are you sure you dont need to use EOL letter.
4) Please check for some other commands of RMC too.
Please confirm the above.
regards,
09-03-2012 11:57 AM
Hi,
Thanks for your advise.
I changed some program and made the length of time out longer, then it worked !
However, I have another problem.
When I send the command "re 0 0 4", the response on the "Port 2" is bellow,
re 0 0 4
RE 0 0 4 0
mrc-1>
(The number "0" on the last word at "RE 0 0 4 0" is the result which I need.)
Response on the Array 2 is bellow,(which is the same as the command I send.)
re 0 0 4
However, when I send the same command "re 0 0 4" many times,
message on the Array 2 suddenly change to " 0 4".
This change always happens after sending the same command 18 times.
Could someone help me, please ?
Tatsuya
09-05-2012 07:05 AM
Tatsuya.F
It looks like that program being used is not reading the whole data available from the port.
Main reason can be , Read functions dont have enough time for execution.
I wonder what happen if you increase your time-wait function(from 10 mSec to somewhat 100m sec)
being used in your Host VI.
regards,