Reading Data from modbus register

Hi,

I have a device that need just one time read of one register every 5 minutes to get the data. We declare the variable and execute TAGREAD once every 5 minutes but it seems CITECT is always connecting to that MODBUS register (not able to get data or lock-out). Using MODBUS tester does not have problem (manually read once every 5 minutes).

Note: This device register can only send data if there is only one MODBUS master requesting data every 5 minutes.

I am using CitectScada 2015 (7.50)

Anyone has an idea how CITECT can read or check data only every 5 minutes? Or can we read that MODBUS register directly without declaring in variable table?

Thanks

Felix C

Parents
  • Felix, I read and write via MODBUS TCP (NOT MODBUS via a serial connection) at a rate of 5 - 10 Hz to @ 450 variables with no problem. The trick is in the configuration, which took me FOREVER to figure out; so I understand your frustration. My system uses a PLC as the MODBUS master, and all other software and hardware devices that read/write to that master MODBUS device read/write to the PLC registers. It is important to have only ONE MODBUS Master in your system. The MODBUS Master essentially serves as the data repository for all of the data you want to share via the MODBUS protocol.

    I am currently running CitectSCADA 2016 w/Update 38. Following is how I configured my system. I recommend writing a script or cicode that will poll the variable you want to log to your log file, or whatever you're doing with the data. The names I use are generic, and you can use any naming scheme you wish.

    Clusters: Cluster Name = Project_Cluster

    I/O Servers: Server Name = IOSERVER; Cluster Name = Project_Cluster

    I/O Devices: Server Name = IOSERVER; Name = IODevice; Address = [RUN]:IO_Dev.CDK; Protocol = MODNET (VERY IMPORTANT, not MODBUS or any of its variants); Port Name = PORT1_BOARD1

    Boards: Server Name = IOSERVER; Board Name = BOARD1; Board Type = TCPIP; Address = 0

    Ports: Server Name = IOSERVER; Port Name = PORT1_BOARD1; Port Number = 1; Board Name = BOARD1; 
    Special Opt = -I10.1.0.1 -P0 -T (the MODBUS Master PLC address is 10.1.0.1. Change according to your situation)

    The next step is to properly configure the addressing of your variables to point to the proper variables in the MODBUS Master device. In your variables database, your variables should follow the following format:

    Tag Name = TAG[##]; Cluster Name = Project_Cluster; I/O Device = IODevice; Data Type = {whatever is appropriate for the tag};
    Address = {whatever is appropriate for the tag}

    The following addresses correspond to the proper MODBUS addresses:

    BOOL/DIGITAL register format: register address is (register number + 000001)
    BOOL register 0's address is 000001, BOOL register 103's address is 000104.

    ANALOG INPUT register format: register address is (register number + 300001)
    AI0's address is 300001, AI24's address is 300025

    ANALOG OUTPUT register format: register address is (register number + 400001)
    AOI0's address is 400001, AO24's address is 400025

    FLOAT/REAL register format: register address is ((register number x 2) + 47001)
    FO0's address is 47001, FO24's address is 47049

    I hope all of the above helps you. If you are using a Citect Server, or some other device as the MODBUS Master, you'll need to adjust the addressing accordingly. Good luck!

Reply
  • Felix, I read and write via MODBUS TCP (NOT MODBUS via a serial connection) at a rate of 5 - 10 Hz to @ 450 variables with no problem. The trick is in the configuration, which took me FOREVER to figure out; so I understand your frustration. My system uses a PLC as the MODBUS master, and all other software and hardware devices that read/write to that master MODBUS device read/write to the PLC registers. It is important to have only ONE MODBUS Master in your system. The MODBUS Master essentially serves as the data repository for all of the data you want to share via the MODBUS protocol.

    I am currently running CitectSCADA 2016 w/Update 38. Following is how I configured my system. I recommend writing a script or cicode that will poll the variable you want to log to your log file, or whatever you're doing with the data. The names I use are generic, and you can use any naming scheme you wish.

    Clusters: Cluster Name = Project_Cluster

    I/O Servers: Server Name = IOSERVER; Cluster Name = Project_Cluster

    I/O Devices: Server Name = IOSERVER; Name = IODevice; Address = [RUN]:IO_Dev.CDK; Protocol = MODNET (VERY IMPORTANT, not MODBUS or any of its variants); Port Name = PORT1_BOARD1

    Boards: Server Name = IOSERVER; Board Name = BOARD1; Board Type = TCPIP; Address = 0

    Ports: Server Name = IOSERVER; Port Name = PORT1_BOARD1; Port Number = 1; Board Name = BOARD1; 
    Special Opt = -I10.1.0.1 -P0 -T (the MODBUS Master PLC address is 10.1.0.1. Change according to your situation)

    The next step is to properly configure the addressing of your variables to point to the proper variables in the MODBUS Master device. In your variables database, your variables should follow the following format:

    Tag Name = TAG[##]; Cluster Name = Project_Cluster; I/O Device = IODevice; Data Type = {whatever is appropriate for the tag};
    Address = {whatever is appropriate for the tag}

    The following addresses correspond to the proper MODBUS addresses:

    BOOL/DIGITAL register format: register address is (register number + 000001)
    BOOL register 0's address is 000001, BOOL register 103's address is 000104.

    ANALOG INPUT register format: register address is (register number + 300001)
    AI0's address is 300001, AI24's address is 300025

    ANALOG OUTPUT register format: register address is (register number + 400001)
    AOI0's address is 400001, AO24's address is 400025

    FLOAT/REAL register format: register address is ((register number x 2) + 47001)
    FO0's address is 47001, FO24's address is 47049

    I hope all of the above helps you. If you are using a Citect Server, or some other device as the MODBUS Master, you'll need to adjust the addressing accordingly. Good luck!

Children