Jump to content

Gabriel Franco

Members
  • Posts

    415
  • Joined

  • Last visited

  • Days Won

    20

Posts posted by Gabriel Franco

  1. 26 minutes ago, Fernando Castro said:

    I haven't been able to use Modbus like that, I am not sure if I am doing something wrong or if my devices just don't work over UDP.

    First of all, not all devices accept UPD. 

    28 minutes ago, Fernando Castro said:

    Is the same? should I Initialize the socket then connect to an IP and then need to use the Modbus functions just polling through my different devices changing IP and Modbus requests?

    or I need to connect toe each device first without disconnecting?

    or not use socket connect at all?

     

    Initialize Ethernet, Modbus and socket as usual.

    image.png.f64e8bb7f380bc91e40400eb15033ad9.pngimage.png.b84d8f7ff94cb1bda7d9e5f1b7f19512.png

    There is not need to connect/disconnect to/from each slave.

    As you mentioned, just select a slave index and use Modbus FB to poll trhough all slaves.

    It may be necessary to add a little delay between devices (in my experience, minimum 100 ms), because of the fact of not having all datagram control present in TCP. However, this delay compared with connect/disconnect times makes UDP by far better than TCP in the overall performance.

     

     

  2. The following message is displayed on the screen sporadically:

    PLC Date/Time

    Date and time was set automatically to local time

    Press OK to continue

     

    The time and date do not change when the message is displayed.

    What does it mean?

    USP-070-B10 + USC-P-B10

    Unilogic 1.33.236

    PLC is connected to Internet, time auto-sync enabled.

  3.  

     

    In my projects, unlike my colleagues, I always use timers instead of counters.

    Reset timer at power-up checkbox means, timer will start over from preset value down to 0 if conditions are met no matter what preset is, if the originally downloaded or any modification you made online or from HMI. This is at least the behaivour I've seen in TD. This scenario is probably differente to TA and TE, due to their inherent retentive operation mode. Rarely I use TA nor TE so I cannot answer it.

    About prest value resetting to 0, I experienced the same thing one time, but it was caused of electrical spikes.

     

    In my projects I always use timers instead of counters.

    Resetting the timer in the power-on checkbox means the timer will start again from the preset as long as the conditions are met, no matter what preset it is, the one you originally downloaded, or any modifications you made online or from the HMI. This is at least the behavior I've seen in TD-like timers. This scenario is probably different from that of TAs and TEs, due to their retentive mode of operation.

    I rarely use TA or TE, so I can't answer for sure.

    About resetting the value to 0, I experienced the same thing once, but it was caused by electrical spikes.

     

     

  4. I would use a machine state using an MI register to track the current step of each slave, e.g.:

    10=reading slave 1 group 1, waiting for response.

    12=no response slave 1. Jump to slave 2.

    14=response ok slave 1 group 1. Process data

    15=reading slave 1 group 2, waiting for response.

    17=no response slave 1. Jump to slave 2.

    18=response ok slave 1 group 2. Process data

    20=reading slave 2, waiting for response.

    ...

     

    In my applications I´ve not needed to add delays between slaves.

  5. Since you want to share datatables between different PLCs, the easiest (easy in terms of a few lines of code) way I see, is to write DT from the source PLC to a SQL database, then any other PLC can retrieve data in any time asyncronously. For reference, my PLC program toom about 330 scan cycles to INSERT 50 rows. 

    If you want to go faster, you would use Ethernet/IP, sending the entire data table (row by row) to each destination PLC.

     

×
×
  • Create New...