09-18-2012 09:57 AM
I'm working with a rs232 to rs485 connection from a UNO2019 box PC. The RS485 connection is going to be MODbus RTU, has about 4 slaves on the buss (MMI flow meter, VFD, two temperature RTD's). All theses devices are configured accordingin
9600 baud, odd parity, no flow control. the VISA resource would be COM3.
Now all these components I've worked with daily for numerious months. and the set up VI exists (almost) without an error. I get an error code for additional bytes at port, but it passes the set up. I don't know if this is wrong or write but it has happened in every peice of software I've developed in labview (it doesn't actually check the error boolean so I assumed it wasn't important).
Currently when ever I try to read registers from the MODbus slave, I get error:
-107380733 (which and mean about 100 different things I've done my research correctly, from wrong bytes at the port, not using the correct termination characters in your message). But everytime I've seen the error code discussed it involved USB/RS232 direct, not RS232 to RS485.
The string attached was
3->MD Serial Master Query.vi
2->MB serial Master Query Holding Register.vi
1->Address Test.vi
Thank you for any light you can shed on my problem.
Solved! Go to Solution.
09-18-2012 01:57 PM
Did some slight trouble shooting since the orginal post. Apperently the wires going into my computer's serial port were incorrected. I fixed the issue at hand, but the same error codes exists.
Infact the same error code exists if the com port has something plugged into it or not.
09-19-2012 02:13 AM
Hi,
You have the open and close of the VISA port inside the while-loop. This way the port is opened and closed all the time. You should place the open and close port outside the loop and make it possible to stop the loop with a stop button.
Also use the open serial port from the Instrument I/O - Serial palette
See how this works.
Kees
09-19-2012 10:52 AM
I did this on purpose, the goal was to open and close the port frequently so I could test multiple I/O configurations (COM channels, baud speed, etc.) without restarting the programming.
While I know it is in bad coding to do that, It functions OKAY (see slowly) on a few other machines. All I need it do is confirm that it can read, a handful of registers to help trouble shoot the actual bus connections.
09-19-2012 10:53 AM - edited 09-19-2012 10:54 AM
The program in and of itself isn't the problem, the program is what I'm using to trouble shoot the problem. The program is functioning. I'm wondering what OS/physical problems could present themselves in the error I'm seeing.
09-19-2012 02:51 PM
Problem was resolved. It was a hardware problem as I thought. Apperently this error code will exist when your RS-232/485 is hard set via dip-switches to not send data.