pturmel

MrPLC Admin
  • Content count

    759
  • Joined

  • Last visited

Posts posted by pturmel


  1. If you have to track in arrays of larger data structures, using ring buffer techniques can greatly reduce CPU utilization.  Using the shift instructions, or COP for shifting, is quite expensive.  Instead of shifting, you add to an integer subscript for the load point to manage where you are in the array.  And wrap around the end.  For physical items on the conveyor a known distance downstream from your load sensor, you simply add to the load point subscript the constant for the distance (in array elements), wrapping it around, too.


  2. 10 hours ago, Joe E. said:

    downstream devices go away

    Primarily.

    10 hours ago, Joe E. said:

    another reason too?

    Troubleshooting problems in cases like this.  Most modern managed switches have features to help technical staff connect wireshark to specific ports, so that sources of bad behavior can be examined unfiltered, and without relying on an intermediate two-port switch.

    Actual DLR, though, is awesome.

    1 person likes this

  3. Wireshark can only capture packets that arrive at the PC's physical network interface.  That often requires using a special mode on your switch to "mirror" everything to the PC's port, and ensuring that all devices are connected to the switch.  You will not be able to capture traffic from daisy-chained devices.  (The dual ports on AB devices should only be used for real rings.)

    The mode problem suggests that the device in question is "owned" by something.  What are these devices?  Please also show your Studio 5000 I/O device tree where Device1 and Device2 are present.


  4. 6 hours ago, Yahya said:

    heartbeat function have to be created manually?

    I would make it precisely to fit my needs.  Maybe Mitsu has something built-in, but I'm not a Mitsu expert.

    1 person likes this

  5. Since the master PLC is actually a modbus slave, and you want that slave to also respond to your monitoring, you will likely need to write a regularly changing value from each slave PLC to separate registers in the master PLC (heartbeat signals).  Then have code in the master PLC that will time out if a given slave's heartbeat stops changing.  Place the booleans for that status in other modbus addresses that the monitoring system can see.  (Or, perhaps, have the monitoring system watch the same heartbeat values.)

    1 person likes this

  6. Share more details.  What is the network topology?  Are both PLCs Allen-Bradley?  Are you using message instructions in one to talk to the other? If so, show the three tabs of a message configuration.

    Embedded service error indicates that a request used message router service 0x0A to embed multiple requests in a single packet, and one or more of those inner requests failed in the target device.  You would have to inspect the nested responses to determine the true error or errors.  (Wireshark will help you do that.)


  7. Failure of the flyback protection on the contactor coil often proceeds to destroy the contact surfaces in the upstream relay.  But there are many possible reasons for mechanical failures, too.  You would need to dismantle the PLC output to determine anything for sure.


  8. 2 hours ago, acpi said:

    replaced by brand new Siemens Rockwell hardware cause it's despite Siemens being more common in Europe

    Fixed that for you.

    Siemens is as bad as Microsoft when it comes to vendor lock-in and other monopolistic behaviors.  Not to mention being extremely unfriendly to 3rd party use of their protocols.

    Going to modern Rockwell would also let you use their conversion tool for PLC5 => Logix.  Not the cleanest conversion, but saves a ton of engineering work.

    1 person likes this

  9. EtherNet/IP Tag sets.  Set them up on each PLC, one to transmit, two to receive.  Ideally, create structure types with the content to transfer.  (This is similar to Rockwell's producer/consumer tags, and uses the same class 1 I/O buffer technology.)

    2 people like this

  10. 12 hours ago, Ken Roach said:

    always the time since boot ?

    CST is Rockwell's precision time from before PTP.  When synchronizing, it is the master clock's time since boot (ish).

    12 hours ago, Ken Roach said:

    Windows 2012 Server instance that has NTP Server enabled

    Rockwell has wisely chosen PTP (IEEE 1588) for its time synchronization.  Much more precise, and auto-configurable in LAN environments.  Put a Time Machines TM2000B on your network, set it to PTP Multicast, and turn on time synchronization in all of the Rockwell products.  (Make sure the ControlLogix processors have time sync connections to their chassis ethernet cards instead of default connections.)

    Every controller will quickly be within single digit microseconds of the atomic clock that drives the GPS cloud.  The TM2000B also is an NTP server, so your less modern IT devices can synchronize, too.

    (I have no connection to Time Machines, other than as a very happy customer.)


  11. 4 hours ago, Ken Roach said:

    You would have to change the WallClockTime object by 60,000,000 microseconds in your program at the appropriate early Sunday morning.

    No, don't ever do this.  Logix underlying clock (and all clock sync operations) run on Zulu time.  The checkbox in the controller properties just tweaks the local time offset.  Since not all timezones obey DST, with many crazy rules, the controller simply doesn't handle it.  Use an SSV to set/clear that checkbox programmatically if you need it.  The WallClock currentValue is always zulu, and should always be used for timestamping.


  12. 1 hour ago, d4rkm4n said:

    best way

    I don't have any specific recommendation for Mitsubishis.  In general, I would use a couple extra registers to hold valid conversions and look for repeat valid values before passing to a "final" value register.  That might be enough to not need a timer.

    1 person likes this