11-06-2007 04:16 AM
11-06-2007 04:17 AM
11-06-2007 04:57 AM
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 ?
11-06-2007 07:30 PM
11-07-2007 01:46 AM
11-12-2007 01:29 AM
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. ![]()
11-12-2007 01:47 AM
11-12-2007 01:49 AM - edited 11-12-2007 01:52 AM
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
When it is set right the rating is in the lower right corner of avery message.
11-12-2007 01:55 AM - edited 11-12-2007 01:56 AM

11-12-2007 02:13 AM
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?