03-26-2008 10:52 AM
03-26-2008 10:53 AM - edited 03-26-2008 10:59 AM
scott_7723 wrote:
Thanks. Well, for some reason I thought I had to stick with only vi's that had ethernet in the name. I was just assuming that all the serial ones dealt with a serial cable...guess not. Thank you for your input. Yeah, the config files were the other half of my problem, but I'll keep looking on the forums for more on that. Thanks.
Yes, you would just have the file I/O VI's work on the data array that would come out or go into the MB Ethernet Query. If you need to, you could also store the starting register, # of registers, device address parameters into the file as well. But that would probably not be necessary assuming you are always using the same chunk of Modbus registers everytime you would either need to read from or write to the file.
11-17-2008 03:31 PM
Could you elaborate how to set START ADDRESS (in serial example vi's).
Intuitively I failed...
Thanks
11-18-2008 04:22 AM
11-18-2008 10:19 AM
If you're so kind...
I was trying (first) to "simulate" the device (Affinity chiller) by using master/slave examples...
Here is a memory map of the "real" thing...
36720 - CWA-075L-NP18OAD5 Modbus RTU addresses: 9600:8:N:1Note: Set delay between polls as short as possible to prevent contact chattering upon startup and shutdown. < 10ms is recommended. Modbus Address 400052Temperature Set Value As Seen on Display: SVData Size: 1 Word = 16 bitsThis register is the process set point value for control in degrees C. It may be changed locally by an operator on the display or remote over Modbus to this register address. Modbus Address 400051Process Temperature Value (Read Only)As Seen on Display: PVData Size: 1 Word = 16 bitsThis register is the present process value for the RTD in the process water line in degrees C. This value controls to the set point. This value can be read locally and in remote over Modbus. Modbus Address 400026Touch Screen “Run” Push ButtonAs Seen on Display: Run Data Size: 1 Word = 16 bitsThis register is the chiller start/stop push button. This can be changed locally or when in remote, over Modbus. The controller will automatically return this value to 0 and start or stop the chiller when it is changed to 1. Modbus Address 400038-0Run Status IndicatorAs Seen on Display: Off/On Data Size: 1 Word = 16 bitsThis register is the status of the chiller start/stop. When the Run Push Button 400026 is pressed this indicator changes state. This can be read locally or when in remote, over Modbus. 0 = Start1= Stop Modbus Address 400029-0Local/Remote Status IndicatorDisplay: Loc/Rem Decimal: 1 WordThis register is the status of the chiller Local or Remote. When the RmLoc push button is pressed on the chiller display this indicator changes state and control point of view back and forth. 0 = Local1= Remote Modbus Address 400061Low Alarm Temperature Display: Low Temperature Setpoint Variable valueDecimal 1 WordThis register is the process set point value for the Low Temperature control value in degrees C. It may be changed locally by an operator on the display or remote over Modbus to this register address. Modbus Address 400062 High Alarm Temperature Display: High Temperature Setpoint Variable valueDecimal 1 WordThis register is the process set point value for the High Temperature control value in degrees C. It may be changed locally by an operator on the display or remote over Modbus to this register address.
thanks
11-18-2008 12:24 PM
you will need to use read or write holding register commands. Addresses will be 52, 51, 26, 38, 29, 61, 62. Since the addresses are not consecutive, the command read/write multiple holding registers won't work in your setup. You also need to know the address of the device (1-255) itself.
You will need to define your hardware setup for this simulation before we can help with the master/slave examples.
11-18-2008 12:41 PM
command read/write multiple holding registers won't work?
Pardon me, what if I try to read 100 registers into an array and disregard the ones which are of no interest?
11-18-2008 12:48 PM
11-18-2008 12:57 PM
This thread got resurrected at a good time. I have an application where I need to communicate with a Love Temp controller. The TC controller uses Modbus and I guess is the slave. My PC would be the master? I am familiar with standard serial communication but the Modbus has me a little confused on terminology. The manual has this listed...
1. Supporting transmission speed: 2400, 4800, 9600, 19200, 38400 bps.
2. Non-supported formats: 7, N, 1 or 8, O, 2 or 8, E, 2.
3. Communication protocol: Modus (ASCII or RTU).
4. Function code: 03H to read the contents of register (Max. 8 words). 06H to
write 1 (one) word into register. 02H to read the bits data (Max. 16 bits). 05H to
write 1 (one) bit into register.
5. Address and Content of Data Register:
1000H Process value (PV)
1001H Set point (SV)
1002H Upper-limit of temperature range
1003H Lower-limit of temperature range
and so on.
Using the Modbus library VIs, how do do I query the process value?
11-18-2008 01:17 PM
Any chance the Love controller is the same as the Omega controller?
I just recently replied into this thread http://forums.ni.com/ni/board/message?board.id=170&message.id=369217. The commands you list sound the same as that user had.
I would recommend taking a look at that thread and see if that poster's VIs will help get you started.