Jump to content

Flex727

MVP 2023
  • Posts

    3,330
  • Joined

  • Last visited

  • Days Won

    241

Posts posted by Flex727

  1. 51 minutes ago, MAL said:

    That is dead code.  That rung is only applicable to the v700.  Its essentially a comment for this use.

    Right-clicking and selecting "Disable" is normally how a ladder rung is turned off, but there are some elements that VisiLogic won't allow to be in a disabled rung. Sometimes I want to disable a rung with those types of elements for some testing or troubleshooting and never thought of doing this <insert headslap emoji>. Thanks for the tip, MAL!

    • Like 1
  2. Hopefully you're aware of the vast differences between the way Ethernet works on a V700 vs a V1210.

    Why is Socket 3 the only available socket? Have you confirmed that you have not duplicated port numbers on any of the sockets?

    Are the PLC and server on the same subnet?

    What communications protocol are you using?

    Have you set up the connect logic properly? Can you post your program here for us to take a look?

  3. 1 hour ago, Joe Tauser said:

    By also assigning port 502 to socket 3  without manually assigning something else to socket 2 we left the PLC in a position where it didn't know whether to shit or go blind.

    Unitronics support always recommends initializing all 4 sockets at power-up even if only 1 or 2 are going to be used. This helps focus your attention on making sure there is no duplicate assignment. Do I do that? Rarely, but having all 4 default socket assignments memorized helps avoid the screwups.

  4. I don't see anything wrong here. Are you able to connect to the PLC from a PC? Are you able to connect to your peripheral from a PC? Have you double-checked all IP addresses and port numbers? I see that you are using port 502 in the PLC and the peripheral. Nothing wrong with that, but just checking. Are you sure the peripheral is set up to be a MODBUS slave on port 502?

    I see in the comment that the slave ID MUST be 255. In my experience I haven't found that to make a difference, but you have ID 254.

    What happens when you try to connect? When you're online does SB 150 come on, even briefly? Does MB 0 come on briefly? Does MB 4 immediately reset?

    Just this morning I was fighting with a PLC that wouldn't connect with MODBUS. I was ready to pull my hair out until I replaced the Ethernet cable. The cable was relatively new and was just recently working. Make sure you troubleshoot the ENTIRE connection, including cables, hub, etc. If you're not using a hub, are you using a crossover cable or adapter?

  5. 27 minutes ago, Jreese37 said:

    This line in the comments says "Below, both Ethernet card initialization and MODBUS Configuration are done as Power-up tasks.
    Note that Socket 2 must be initialized, via the Socket Init FB, to function as a TCP Master. Network ID number MUST be 255!"

    I noticed that it is set to socket 3 in the demo file, and also set to client, along with the MODBUS IP CONFIG function block socket is set to 3. I had seen in some prior documentation that some were using different socket numbers there in the initialization rung. I was highly confused about how that could ever possibly work?

    Sockets are just defined pathways to specific ports. You can use any of the 4 sockets interchangeably as long as you have initialized them correctly and don't have 2 with identical settings. Each of the 4 sockets have a default initialization, but can be changed at any time (normally at start-up) with a socket initialization function block. The fact that the rung comment and the following ladder rung don't match is just a typo in the comment. Of course, the socket number must match in the initialization FB, MODBUS configuration FB, TCP connect FB, and the  MODBUS read or write FB.

     

    33 minutes ago, Jreese37 said:

    I'm a bit confused as to how the hex conversion in Visilogic works, if I enter a 3 into the Start of vector box, and set to hex, it doesn't appear to be giving me the actual value for 3(0x0003.) Although I don't suspect this matters whether I enter it there as hex or decimal?

    I'm not sure what you're expecting here, 3 is the same in both hex and decimal. Enter a number greater than 9 if you want to see a conversion.

  6. 44 minutes ago, Akash said:

    That input is linked to in Picture3 Set bit but it is not red why? 

    You lose me here. I don't see any link between Input O and the Set Coil in Picture 3 and there is no power flow to the Set Coil (TraceDataRecorded). I haven't downloaded your program file as I need to know the UniLogic version it was saved with.

  7. 37 minutes ago, Ausman said:

    Re the toggle coil, I had never thought it would be put on the rail, but agree it looks that way.   This is akin to those manuals where the people who made the product explain how to use it,  but because they know it innately the manual has lots of missing info because the writers know all about it in the first place. 

    No worries. I only pointed it out because I think we were confusing the OP. He put it in his program exactly as you showed with the Toggle coil on the left rail.

  8. 1 hour ago, Ausman said:

    Elevator test is being called, but only on one scan after TD210 times out.  Rung 4.

    That's calling an HMI screen, not a subroutine.

    1 hour ago, Ausman said:

    Flex, my suggestion was a different way to control the output other than what was initially being done, but I was expecting Nico to control the toggle somewhere else using logic they would think out.   The whole point was don't have 2 MBs that will possibly conflict with each other controlling an output.  How to do it and how to display it was a point of learning for Nico.

    You can't have a Toggle coil hanging on the left rail. I suppose you could, but it would uselessly toggle on every scan.

  9. On 1/15/2023 at 3:30 PM, Ausman said:

    MB7      O84

    -(X)------(    )----

    What is this, @Ausman? This cannot work.

    @Nico, this is awful coding and I don't even know where to start. Tell me in words exactly what you are trying to do (for example, "I'd like to turn O-84 on and off with a single button on screen", or "I need to have two separate buttons, one for OFF & one for ON", or...) and I would be happy to show you the proper way to do it.

    You claimed that you were calling the "02 Elevator Test" subroutine, but I sure don't see it.

    A general principle to keep in mind for the future - only one logic thread per ladder rung (rungs 2 & 4 each have two logic threads).

×
×
  • Create New...

Important Information

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