RS-485 Citect communication with Algodue UPM304 energy meter

captain_is

Member
Join Date
Mar 2009
Location
Romania
Posts
57
Hy,

I need to settle a communication between Citect and an energy meter(type Algodue UPM304) and i struggled a lot with no results.

The energy meter stores its measurements in hex registers like this :

$0000 - 2 word - System Voltage [mV]
$0002 - Phase 1-2 voltage
$0004 - Phase 1-3 voltage
$0006 - Phase 2-3 voltage

and i need to read from this in Citect over RS-485 and Modbus.
I configured the energy meter as an I/O Dev..and variable tags like this :

400001 - System voltage
400003 - Phase 1-2 voltage ..etc..

I receive in kernel an error like this :

Uinit 000008 Driver error 00000257 (0x00000101) 16

I tried to look in the Citect Knowledge Base and also in other location for a hint, but nothing useful...

Can someone help me ?

Thanks in advance!!
 
Get yourself a modbus test program. Ive used Modsim, SimplyModbus (shareware, has a limited trial version available) and others , probably best to look on the internet. it could be that you have too many zero's in your citect address. It could also be that Citect will "block" your data request and when you ask for 40001 Citect may infact attempt to read a block of integers 40001 thru to 41001 (I don't know how big Citect's block's are this is just an example) and if your meter doesn't have address 41001 you will get an error. read thru the help on the parameters that you can modify of the modbus protocol
 
i already have SimplyModbus ...and when i make a request...it returns me the value i want...
for example if i ask for current measurements it will give me the values of the registers :
40029 to 40044..
and it's all ok..but when i configure the same addresses in citect...for variable tags...and try to display them in a page ..i get #COM in that fields...i also get an error in kernel :

Uinit 000008 Driver error 00000257 (0x00000101) 16
and it says unit offline....
I'm really stucked with this error because i can't find a solution..

Thanks for you reply Dua Anjing..
 
Citect interrogates a particular memory location to determine whether it is on-line or not. Your problem may be that your meter does not have that particular address. This is extract from v7.0 help
Some non-standard PLCs support the MODBUSA protocol. However, some of these I/O Devices do not support the MODBUSA protocol correctly. When CitectHMI/SCADA tries to communicate with these I/O Devices, you can get errors on startup or during communication.

To handle these non-standard I/O Devices, the MODBUSA protocol has some special options to change its operation:

1. On startup, CitectHMI/SCADA tries to read some digital inputs to verify that the PLC does exist. If CitectHMI/SCADA cannot read these bits, it assumes the PLC is bad, and remains off line. Some non-standard I/O Devices do not support digital bits, so this command fails. With the [MODBUSA]InitType parameter, you can change the type of variable the MODBUSA protocol tries to read on startup, to allow communication to start.
2. The standard MODBUSA driver allows reading of 2000 bits in one request. Some non-standard I/O Devices do not support such large reads. You can change the maximum read size with the [MODBUSA]MaxBits parameter. (The default is 2000.)

You must also change the MAX_LENGTH field for the MODBUSA protocol (in the \CITECT\BIN\PROTDIR.DBF file) to the same value. You must re-compile your project after changing this option. Note that if you reinstall CitectHMI/SCADA, the PROTDIR.DBF file is overwritten - you must repeat the change.
3. Some I/O Devices that operate over radio modems also require the padding of protocol messages. The padding characters wake the radio modem to allow the rest of the message to be transmitted. Set the [MODBUSA]Padd parameter to the number of characters to pad, and the [MODBUSA]PaddChar parameter to the ASCII code of the character to pad. For example, to pad 20 0xFF characters to the start of the message, set:

[MODBUSA]

Padd=20

PadChar=255

CitectSCADA Driver Help. Copyright © 2004. Citect Pty Ltd. All rights reserved.
 
This is from Modbus Driver help.. sorry this table didn't "paste" too well..
[MODBUS]InitType18

The type of variable the Modbus protocol tries to read on startup, to allow communication to start.

Allowable Values: 1 to 4, where:



InitType
Address
Variable

1
00001 - 00017
Output status

2
10001 - 10017
Input status

3
40001
Output registers

4
30001
Input registers




Default Value: 2

With this parameter, you can set different values for specific I/O devices or groups of I/O devices. See Modbus device/group-specific parameters.

[MODBUS]InitUnitAddress18

The Modbus driver reads the citect.ini file to determine the correct unit address for initialization of a PLC. InitUnitAddress is the parameter used to set the unit address.

Allowable Values: 0 to 65535
Default Value: 0

With this parameter, you can set different values for specific I/O devices or groups of I/O devices. See Modbus device/group-specific parameters.
 
Last edited:
I succeed to communicate with the meter...now it is in running state...but i get
Address out of range..
I modified just the [MODBUS]InitType
In the meter's manual it says that it can read up to 124 register in one command...and citect tries to read 125 (2000 bits)
Is this the problem?
I need to modify also the MaxBits parameter?

Thanks a lot for your tips..
 
I tried to modify also the MaxBits parameters...but when i modify PROTDIR.DBF to the same value..my compiler stops working...:-s
 
I succeeded after all to get those values i need from the energy meter.. i need to make some array variable tags..and now it's all ok...i will need to do this also from a plc...but ..until then.. Thanks a lot for your answer...i'm not yet very experienced with all this...and everything helps...Thanks again!!
 

Similar Topics

Hi guys, I'm having problems with our Citect trends from our PLCs based on our DH+ network at our workplace. I've recently been put in charge of...
Replies
10
Views
5,629
I am trying to work out if I can connect Citect to a SLC5/04 with the following setup. SLC5/04 AIC+ (from 232 serial port on SLC5/04 to DH484...
Replies
5
Views
2,281
Hi all. I am hoping to setup a very cheap citect computer for a customer. Im currently looking at slotting a PKTX card into a PC to communicate...
Replies
0
Views
1,787
Hi all. I need some advice on what my options are to connect citect version 6 to an SLC5/04 processor. The Processor currently has a DH485 network...
Replies
4
Views
1,870
I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
7
Views
217
Back
Top Bottom