LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

example "NI 9870 Continuous Serial Read On-Demand Write.lvproj " doesn't work

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?

0 Kudos
Message 1 of 4
(2,858 Views)

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,

0 Kudos
Message 2 of 4
(2,844 Views)

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

 

 

 

Download All
0 Kudos
Message 3 of 4
(2,829 Views)

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,


0 Kudos
Message 4 of 4
(2,814 Views)