Showing results 1 to 8 of 8

Thread: 64bit data type in modbus

  1. #1
    Join Date
    26.11.2009
    Location
    automationengineer20@gmail.com
    Posts
    59

    Default 64bit data type in modbus

    In my case, IEDs should time synchronized by zenon. The IED type is P123 from AREVA and its protocol is Modbus RTU. Zenon dose not support data type of time register in P123 because it consists from 4 word (64bit).
    Please find its data sheet as attachment.

    How can I write pc time to these registers in Modbus RTU protocol by zenon?
    Do you have plan for supporting LREAL or ULINT datatypes in future for zenon modbus driver?

    thanks
    Attached Thumbnails Attached Thumbnails P12x_enct_f75.pdf  

  2. #2
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    845

    Default Re: 64bit data type in modbus

    you have to turn on in project.ini block write, e.g.
    [MODRTU32]
    BLOCKWRITE=1
    and then send all 4 words in one recipe (use Recipe Group Manager).
    The value for this 4 word variables you can calculate in straton or VBA.

    >Do you have plan for supporting LREAL or ULINT datatypes in future for zenon modbus driver
    Yes, we are planning but there is no deadline yet.
    And we have plans to extend Modbus_Energy driver with time synchronization features for each PLC-type the driver supports already, e.g. AREVA p127.

  3. #3
    Join Date
    26.11.2009
    Location
    automationengineer20@gmail.com
    Posts
    59

    Default Re: 64bit data type in modbus

    Hi. Thanks,
    I turn on mentioned parameter in project.ini but it has been clear in every start of RT.
    Then I created four Modbus UINT holding register variables with address 2048/2049/2050/2051 for a new Recipe Group. The value calculating is not important in this stage and I import them manually in editor.

    The time of device dose not change when I execute function of Recipegroup manager manually in RT and also there is no recipegroup for selecting in its screen in RT when I select filter.

    What is your comment for me?

  4. #4
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    845

    Default Re: 64bit data type in modbus

    >I turn on mentioned parameter in project.ini but it has been clear in every start of RT.

    in zenon there are two project.ini files.
    The original (for Editor) of project.ini is kept in your SQL directory, e.g. C:\ProgramData\COPA-DATA\SQL\167fe539-96f0-4058-b25f-b425b0810e06\FILES\zenOn\system (up zenon 6.50 you can use shortcut Ctrl-Alt-E on project name to jump into).
    You probably just edited the copy of the project.ini in the RT directory. Not the start of Runtime - but every compilation - overwrites this file.

    > in RT there is no recipegroup for selecting in its screen in RT when I select filter.

    Look on property "RT changeable data" of your project (in group General). You probably forgot to let Editor to send the Recipegroup Manager file to the Runtime. BTW, if generation of RGM file is blocked, during every compilation the Editor writes warnings in Output window "project.mdb File will not be overwritten!"...

  5. #5
    Join Date
    26.11.2009
    Location
    automationengineer20@gmail.com
    Posts
    59

    Default Re: 64bit data type in modbus

    Many thanks for your exact guide. I could do your mentioned instruction for one device successfully. Now I have some questions about time synchronizing for 20 devices (five devices in four RS485 serial buses).

    Time synchronization with high accuracy is important in my project, and it is necessary there is no different time between all devices.
    1-Which way do you offer for me to reach it?
    a.For example time synchronization all devices in one step or device one by one?
    b.creation multiple RGMs, e.g. for each serial bus one RGM or all of devices with one RGM
    c.or other way

    2-What is your suggestion about activation of “synchronous writing” in RGM?

    Thanks in advance

  6. #6
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    845

    Default Re: 64bit data type in modbus

    What about use of a time server, e.g. some SNTP application? I think only that way you can assure best possible time synchronization.

    The MODBUS protocol is not time precise and there is no reliable mechanism in this protocol a master could use for synchronizing all connected devices. When your devices should be exactly time synchronized make it using some other protocol, MODBUS is too simple.

    If not external time server but MODBUS, then I see two ways:

    1. Send the same time information to all devices, using 1, 5 or 20 recipes, doesn’t matter. But on the devices store the time information in some dummy register, not in register the device stores its time currently. And next send some broadcast to trigger at once in all devices rewriting time register with value stored in dummy register. It could be possible only if you can program your devices. And I suppose you cannot program your AREVA, so this way is not realizable for you.

    2. When you do not have influence on the program running on devices then the only way I see is to try to make devices so precisely synchronized with master's PC as it's possible. Synchronize each device separately, thus create 20 recipes. Fill out and send recipe to each device one by one.

    Fill only one recipe with current PC time and immediately send it to device. And then make the same steps with (new) current time for next device. In the MODBUS protocol, when you have several slaves on one bus the master sends/receives data from slaves one by one, so the next device has to wait until the previous device answers.

    Each delay between filling out recipe and sending it means loss of synchronization precision. The "synchronous writing" makes zenon to wait of the write acknowledge from device. It can prevent that you will try to send next recipe before the recipe for previous device was accomplished and the driver is busy.

    In straton there is a MODBUS Master too and you can synchronize one device pro one straton cycle with precisely (milliseconds) known current time.

  7. #7
    Join Date
    26.11.2009
    Location
    automationengineer20@gmail.com
    Posts
    59

    Default Re: 64bit data type in modbus

    I agree with you on your second way but today i attend to another way.
    There is other capability that is sending broadcast message for all Modbus slaves by master. It require Modbus frame with 0 salve address so all devices in bus receive data (e.g. data &time) simultaneously. More software uses from this way for time synchronization of modbus slaves.

    Could I send Modbus message with zero salve address by zenon?

    Also my device supports only the Modbus protocol and I must do the time synchronization by it.

    Thanks

  8. #8
    Join Date
    01.07.2008
    Location
    Salzburg, AT
    Posts
    845

    Default Re: 64bit data type in modbus

    What you are describing - sending in MODBUS protocol a frame with slave ID = 0 - it is the broadcast, I've mentioned. This simpler concept would only work if in all your devices the time register has exactly the same format and the same offset (register address).

    For all 4 driver instances (i'm assuming you have as many driver instances as serial buses) create a set of variables responding one time register. In the property Net address of the variables set 0 (your broadcast address). Make 1 recipe sending time information for all 4 sets of variables.

    Please note that one cannot assure each device will act on broadcast immediately, a device can be busy, store received broadcast in some queue in the input buffer and act on it with delay.

Similar Threads

  1. How can I read this two type of Data register?
    By michael_k in forum Drivers
    Replies: 1
    Last Post: 24th November 2009, 16:23
  2. Modbus read input status
    By maurodx in forum Drivers
    Replies: 3
    Last Post: 2nd September 2009, 00:21
  3. Replies: 1
    Last Post: 1st April 2009, 14:31
  4. Processor type
    By sebastiank in forum zenon Operator
    Replies: 0
    Last Post: 19th September 2007, 16:15

Posting Rules

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