Showing results 1 to 9 of 9

Thread: command using Modbus TCP/IP

  1. #1
    Join Date
    23.09.2013
    Posts
    10

    Default command using Modbus TCP/IP

    Hi all

    i am using Zenon 7.10 and i have PLC S7-400 from Siemens, the connection betwen the PLC and SCADA by Modbus TCP/IP protocol please chech my problem :
    when I create new variable (command Variable)and set the offset for it only (don,t attempent to send command yet), the driver which related to this variable crashed ,nothing can read using this driver now,when i delete this command variable the driver working again and i can read the variable value again (after creating this command variable it was invalid)???!!

    regards,
    Last edited by ziadnajjar : 29th January 2014 at 05:43

  2. #2
    Join Date
    23.09.2013
    Posts
    10

    Ausrufezeichen Re: command using Modbus TCP/IP

    what ?

  3. #3
    Join Date
    02.07.2010
    Posts
    13

    Default Re: command using Modbus TCP/IP

    Hi Ziadnajjar

    That sounds strange.

    It would be great if you can create a short Demo project which shows this behavior and add it to the thread. Which zenon build you use for this project.

    Best regards,
    Anton

  4. #4
    Join Date
    23.09.2013
    Posts
    10

    Default Re: command using Modbus TCP/IP

    please tell me how I can configure the driver to be holding register (read or write ) ????? where I should use 3 (read) or 10 (write) in the driver or variable configuration

  5. #5
    Join Date
    23.09.2013
    Posts
    10

    Default Re: command using Modbus TCP/IP


  6. #6
    Join Date
    23.09.2013
    Posts
    10

    Default Re: command using Modbus TCP/IP

    any feedback

  7. #7

    Default Re: command using Modbus TCP/IP

    Hi ziadnajjar,

    If your inquiry is urgent and you have an SLA, please contact your local COPA-DATA support

    The modbus TCP driver will automatically execute the correct modbus function to write or write holding register(s) for the variables in the project, when it is necessary to read the variable or write the variable.

    You just need to create a new variable, at the driver object type, select "holding register" or "register" (depending on which modbus driver you are using), and set the correct offset.

    Note, that if your manual lists an offset like 40001 for a holding register, you need to enter "1" in zenon.

    Best regards,
    Mark

  8. #8
    Join Date
    23.01.2018
    Posts
    1

    Default Re: command using Modbus TCP/IP

    Hi all
    Dear masters I want to use a modbus TCP driver to establish a conection to zenon, but I dont know how set the offset. for example the the address of a coil in modbus list is 10001 or a register address is 34097. I dont know how set their offset in the zenon variable. 
    Thank for help.

  9. #9
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    801

    Default Re: command using Modbus TCP/IP

    Some manufacturers of MODBUS devices are starting addressing not by offset 0, but by offsets "shifted" depending the modbus function type. This was implementation in first Modicon devices (the first programmable logic controller or PLC). 

    Examples - for most popular modbus function types: 
    • multiple (holding) register - FC 3 and 16 - data point reference 0 responds 40001 in Modicon
    • coil - FC 1 and 5 - data point reference 0 responds 00001 in Modicon
    • discrete input - FC 2 - reference 0 responds 10001 in Modicon
    • input register - FC 4 - reference 0 responds 30001 in Modicon

    And some manufactures are confusing FC and offset "shift", and adding or subtracting 1
    So finally sometimes the user has to do some "reverse engineering" to find out if a data point "coil with reference 10001", is maybe for true a 'discrete input', not 'coil'; and with offset address 0 (or 1). Or maybe it is a coil with offset 10001 (or 10000).    
     
    The modbus drivers in zenon are not using this Modicon "shift", the variable property 'Offset' shall be set starting from 0.

    Steps to find values for addressing of zenon variables:
    1. check in the manual of your modbus device the FC number, and basing on this then choose for zenon variable the matching 'driver object type' setting. The mapping of modbus function codes to zenon 'driver object types' is documented in MODRTU32 -> Creating variables -> Driver objects and datatypes -> Driver objects
    2. The variable property 'Net address' must be the Slave ID (also called: unit ID, bus address etc.) and for sure not 0 (0 is broadcast). The same Net Address has to be configured in the driver configuration.
    3. The variable property 'Offset', hmm, try the most probable combinations, good luck

Similar Threads

  1. Kommunikationsproblem mit ModBus TCP
    By schroder in forum Drivers
    Replies: 3
    Last Post: 5th August 2013, 16:58
  2. Replies: 2
    Last Post: 4th June 2013, 10:18
  3. S7 TCP-IP simulation
    By tihomir in forum zenon Energy Edition
    Replies: 6
    Last Post: 18th April 2013, 16:22
  4. STRATON controling Modbus TCP slave bus controller with IO's
    By barszcz in forum straton / zenon Logic
    Replies: 3
    Last Post: 24th February 2013, 00:30
  5. Real Variable Modbus TCP
    By pkreisel in forum Drivers
    Replies: 1
    Last Post: 15th February 2011, 23:39

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •