Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Modbus frame

0 Kudos
Message 11 of 39
(2,322 Views)
0 Kudos
Message 12 of 39
(2,321 Views)

Back to basics.

Can you try this VI. It will receive the COM port data and writes it to a file when you stop the VI

Correct baudrate in the VI before start.

Send known data from the micro and save the RS-232 data. Can you post the data file ?

0 Kudos
Message 13 of 39
(2,310 Views)
KC. I'm using 8.2. The file is using newer vers isn't it? Is it possible to give me another 1? Thanks Smiley Wink
0 Kudos
Message 14 of 39
(2,304 Views)
Here you are.
0 Kudos
Message 15 of 39
(2,288 Views)

Hi KC,

We finally get the response from micro. Thanks to your advise we've been analyzed one by one what went wrong here. Last time we thought that query and response should be in separate lines. But after look at other RS485 device, modbus query and response should be in 1 line and the other line is just inverting the signal isn't it? Our concern now is to get the right baudrate to communicate between LV and micro. Even if we set the baudrate to be 9600 but there are some parts in micro that we should carefully take care of like oscillators etc. We will be working on it and do some more reading and tests.

Thanks for everything. Smiley Wink

 

0 Kudos
Message 16 of 39
(2,243 Views)
KC. It's not that I dont want to rate ur answer...actually I don't know where should I click to rate it...I can't see anywhere .Tell me ok.. Smiley Very Happy
0 Kudos
Message 17 of 39
(2,233 Views)

Hi,

Well you should where you working with. RS-485 2-wire is a balanced line. There is also RS-485 4-wire where Tx and Rx go over different lines.

You didn't mentioned where the text file you posted is comming from. In this file I see Modbus alike frames, but is don't think the format is correct. It also depends on your device.

Did you look at the file with a text editor ? ModBus data is NOT ascii !!

the first frame is: 01 04 04 20 20 20 20 FB 84

Is this what you send and/or expected.

 

Did you already tried to echo back a character received at the micro. This way you can test your link with Hyperterminal or a LV program without the trouble of ModBus frames. Do you have access to the program in the Micro ??

 

 

You rating showup depends on a setting in your profile. I think  Smiley Surprised   When it is set right the rating is in the lower right corner of avery message.



Message Edited by K C on 11-12-2007 08:52 AM
0 Kudos
Message 18 of 39
(2,230 Views)


Message Edited by K C on 11-12-2007 08:56 AM
0 Kudos
Message 19 of 39
(2,225 Views)

Hi,

Yes. I'm aware of that. Isn't that because of RTU mode that we set in program and slaves? In real LV program..we just display the string to HEX and then typecast to DBL. Is it wrong?

 

0 Kudos
Message 20 of 39
(2,220 Views)