09-06-2008 01:02 PM
No. Let me explain you the situation. Look at the picture attached. One of this device needs a proprietary software to setting. But this software was able to detect all device which speak in modbus RTU, too. If all devices were detected I have concluded that the conections are ok, right? Except to the flowmeter, the other devices have the same parameters to setting (address number, baud, parity and stop bit). This flowmeter works with another parameter called bit order. We achieve to change data all device, except the flowmeter (error 6101 timeout). It seems that the flowmeter doesn't understand the master message and so return the timeout error. I suppose that if the slave does not understand the message it modbus telegram is different, Am I right? Any idea to solve this problem?
Answering your questions:
1 - The proprietary software works.
2 - If the proprietary software detect all devices so the wiring is ok.
3 - We are using RS-232 to 485 converters
4 - The RS-485 works in 2 wire.
09-06-2008 08:24 PM - edited 09-06-2008 08:30 PM
I'm sorry, but I'm still not 100% clear. Are you saying the proprietary software does or does not work with the flowmeter?
I agree that it seems your wiring and converters are all okay since the other devices are working. So it would come down to the communication settings or protocol with that one device. Yes, if there is a problem with the message structure, the flowmeter won't return a message and you would get a timeout error. I assume that the bit order parameter you are talking about is a setting to determine whether the device is big-endian or little-endian (which is actually byte order, not bit order). Modbus standard is big-endian. Try changing the settings to see if any of them start working.
I would also recommend starting smaller. Try to get it working just reading a single parameter. Double check the address, baud rate, parity and stop bit again on that device. Double check the wiring. Perhaps on that one device you have the polarity of the two wires reversed. (Actually, I would check this first since it is probably the easiest to check.)
If I may make a few comments about the VI's you posted earlier.
1. Clean up wiring so that the flow of the wires is left to right.
2. Try to eliminate the stacked sequence structures. If a sequence is necessary, the flat sequence is better as it doesn't hide code and will allow the wires to flow left to right. (By necessity, a stacked sequence forces some wires to go the other way.)
3. You are using a huge amount of global variables for communication. I was clicking "Ignore VI" for quite a while when I was trying to load your VI since those globals weren't included. I would recommend storing all of those values in an array, then you can use the index array function to get the value out for particular variable. I would also recommend looking up action engines as the means of transferring the data from the reading VI to others.
4. Converting the array of registers to a cluster which you then unbundle is an extra step. It would be better to use the index from array function which can be resized downward to get multiple array elements from a single icon. If you start at 0 and all of your array elements are sequential (as it seems to be with your unbundle cluster function) you won't need to feed any constants into that expanded Index Array function.
5. In that repeated code, you are taking the integer value converting it to a hexadecimal string, then converting the hexadecimal string to a decimal number. I don't see any way that conversion would work. For example, if the result is 1234, it would be converted to the string 04D2. Converting that to a decimal number the result is 4.
6. Don't use the True constant wired to the loop's continue terminal. Set up a boolean button wired to a loop stop terminal so that the user can stop the program nicely. With the way you have it, the only way they can stop the program is by hitting the Abort VI button.
09-08-2008 02:08 PM
09-08-2008 02:26 PM
I believe I understand a little better your situtation. Definitely try to use the Modbus libraries with the device only trying to access one of the registers at a time. I'm wondering if there could be an internal limit in the flowmeter that restricts how many registers you can read at once in multiple register read. You may even want to temporarily disconnect the other devices from the RS-485 network.
You may also want to snoop in on the conversation between the other proprietary software and this device. I have not used it yet, but others on this forum have talked about a program called Portmon. If you can capture the data stream back and forth between the software and the flowmeter while the software is discovering the device (and having the other good devices disconnected from the RS-485 serial lines will cut down on extra data traffic), you may be able to see something interesting.
09-08-2008 03:05 PM
Ravens,
I have already made this. I isolated the flowmeter from the others and tried to access one of the registers at a time. But the same message error appeared again. How could I make sure that the modbus telegram exchanged between the master (labview) e slave (flowmeter) are compatible?
I will try monitoring the flow of data with the Portmon.
Thank you.
09-16-2008 02:21 PM
Reavens,
I have solved the problem. The Coriolis Promass 83 flowmeter has been working with 2 stop bits. I have just changed the bits from stop bit and worked. The master (labview with the computer) had sent a wrong modbus telegram. So, the error has been created (timeout 6101). The picture shows the place in Init.vi which needs to change.
Thanks,
David
09-16-2008 02:50 PM
I'm glad you found it.
I have never used that serial init VI before. I think anytime I am doing serial, I am using the VISA functions to set those parameters. They really should have turned that constant into a control like all the other serial port settings in that VI.
02-04-2009 11:34 PM
Hai,
I am getting the same error could you please tell me how did you solve it.
I am attaching the vi with this have look and tell me where i am going wrong.
My instrument is CONZERV digital power meter which uses modbus RTU for communication. i checked the settings in the instrument like
baud rate:9600,databits:8,stop bits:1, parity:even.
data type:32-bit float(real)
unit id in the instrument : 1
The following trials have been done,
- Specified the instrument id in the programm as 1 but a time out error has come (error code:6101)
- Specified the instrument id in the programm as 0 no errors observed but i am not able to read any data.
could you please help me inthis regard.
02-04-2009 11:38 PM - edited 02-04-2009 11:43 PM
In the constant where you have the slave address defined, you have it set to zero which is not valid. You need to make it a 1 which you said is the unit ID of your instrument.
See how that works. Then drop the 4 from the modbus address register if necessary. It is likely 3037 or 3036 you want to enter to get register 43037.
Why did you post into another old thread? Had you even tried the tips provided in the first old thread you already posted into?
http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=382366#M382366
Please continue there.
02-05-2009 06:03 AM