Jump to content

Flex727

MVP 2023
  • Posts

    3,325
  • Joined

  • Last visited

  • Days Won

    241

Posts posted by Flex727

  1. 12 hours ago, dhuggins88 said:

    my total sessions and acknowledgements weren't incrementing correctly on all 3 R/W Mixed FB's

    What does this mean?

    12 hours ago, dhuggins88 said:

    Does it appear as if it would work as expected?

    I didn't see any glaring problems, but the issue with comms is that every single detail must be exactly right in order for everything to work. It requires going through every entry of every FB, loading into the PLCs, and observing operation - something I didn't have time to do.

  2. 1) When commenting, use full sentences.

    2) Use the port numbers I suggested, Leave Socket 1 as 20256 for PC-PLC comms.

    3) You cannot initialize more than one socket to the same port number.

    4) Don't try to initiate a MODBUS command immediately on the heels of the previous one. Give it a little delay (maybe 20-50ms)

    You seem to be confusing local ports and remote ports. For simplicity, and to avoid confusion, I always use the same port number for master and slave, that way it's impossible to confuse them. Same port number for master and slave means the following:

    Master PLC: S0=20261, S2=20262, S3=20263

    Slave 1 PLC: S2=20261

    Slave 2 PLC: S2=20262

    Slave 3 PLC: S2=20263

  3. If you would add comments to the rungs telling us what you're trying to do it would help immensely. Your code doesn't really match that well with your post and there is no way to tell if what you're doing is right if I don't know what you're trying to do.

    A few small items:

    1) You do not need a ladder rung to set SB 168. Just the Power-Up as Set is sufficient (which you have done).

    2) Try to avoid using Port 502 for this (just as a convention) as that is normally used for communicating with SCADA and other Ethernet connected devices. To help with identification, use Port 20261 for Slave 1, 20262 for Slave 2, etc. (just a suggestion, the PLC doesn't care what port numbers you use).

    3) You don't really need to perform reads and writes separately since you have the handy Unitronics function for R/W.

    4) If you have separate sockets for each slave there is no need to disconnect the socket, ever.

    5) What is Socket 3 being used for?

    6) Name your MODBUS_IP Configs to match the slave it will be used for.

  4. It's impossible to tell what you have from a screenshot of 3 rungs. Post your entire project with very specific questions and we'll try to help. Please keep in mind that nearly everyone on this forum is an unpaid volunteer with actual jobs, not Unitronics employees. We want to help but no one has time to write your program for you.

  5. This is an IT question, not a PLC question. The PLC doesn't behave any differently than any Ethernet connected device. You do not need a computer in the network with the PLC. All you need is to have the PLC connected to the internet in some fashion. The most common simple (most simple, but not the most secure) connection is to have the modem connected to a router and the router connected to the PLC. Within the router setup you would set up port forwarding to have port 20256 forwarded to the IP address of the PLC. Then you would connect to the PLC from outside the network with VisiLogic by connecting to the static IP of the modem and port 20256.

  6. On 6/19/2019 at 5:28 PM, Flex727 said:

    Not 100% certain, but I believe you can. You must use the correct connection cable though.

    By the way, the direct replacement for the EX-A1 is the EX-A2X, not the EX-RC1. The EX-RC1 connects to the PLC using CanBus and is a REMOTE expansion adapter. The EX-A2X is a LOCAL expansion adapter, like the EX-A1.

    Sometimes when I'm driving I feel like my car is invisible too.

  7. 46 minutes ago, Ken Hoang said:

    I've checked and the state of MB12 is definitely HIGH during the above operation.

    Remember that power flow will only occur on the scan with the positive transition. MB 12 can be high all day and there will be no power flow to MB 33 except on the scan when the transition occurred. While you're online, manually Reset MB 12, then Set it again to see if the MI increments.

  8. Everyone encounters this type of problem from time to time. Rest assured that the PLC is executing the code properly. You can troubleshoot by placing an Increment function with an unused MI at strategic places on the suspect rungs. Here is how I would go about it:

    First, perform a search to make sure MB 12 & MB 33 are not being used elsewhere by mistake.

    Second, confirm the subroutine is being called by the Main Routine.

    Third, place an increment function just after your MB 33 Set coil.

    Fourth, place another increment function (different MI) at the end of your logic thread with the MODBUS FB.

    Then download and go online and watch what happens.

    I have one more question. You addressed how MB 33 was being Reset. How about MB 12?

    • Like 1
  9. Please don't duplicate post. This forum is staffed by volunteers, not Unitronics employees for the most part and is moderated. It can sometimes take a few hours for someone to approve the post as we also have real lives and jobs away from this forum. You, appropriately created a new topic and have a couple of responses there already - let's keep the responses there.

×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.