Jump to content

Flex727

MVP 2023
  • Posts

    3,325
  • Joined

  • Last visited

  • Days Won

    241

Posts posted by Flex727

  1. 8 minutes ago, Al. said:

    For deleting variables in the subroutines and displays, I did it manually and made sure that the variables are removed (MB initialized ; MI, ML, T set to 0 ; etc.). it was long and tedious but now it is fine.

    Why did you feel that was necessary? All you're deleting is the descriptor text that the PLC never sees anyway.

    If you have a bunch of operands that are no longer being used and you find the descriptor text annoying, you can go to View / Operands Not Referenced in Project. That will generate a list that you can delete from.

  2. My guess is that there's a mistake in the VisiLogic software that embeds the version code in the project file when first saved. They probably forgot to update that line of code. However, there's different code that UPDATES the project file to the new version when an older version is opened. That code is correct, so once the file gets opened the second time and saved it finally has the correct version code embedded in the file.

    That's my theory anyway.

  3. Just to be clear, in order to lose data, both the battery must be dead AND the 24v power must be disconnected from the PLC. EITHER the battery or the 24v power supply will maintain all data. You can replace the battery with power connected without losing data.

  4. I'm not sure why you posted this topic again since you are getting a lot of responses and help here, but I deleted it.

    On 3/26/2019 at 7:36 PM, Flex727 said:

    You have a hardware or electrical noise issue causing your problem.

    You say there is no VFD, which can be a likely source of electrical noise - that is not to say there isn't a source that you'll need to track down. Electrical noise can really be a pain to troubleshoot, but that is what you're going to have to do. If you think there is no chance this is electrical, then you might want to start swapping out hardware components. You can also remove your PLC from the current environment and let it run for awhile on your office desk. No Fatal error likely means some electrical problem in your panel.

    Joe Tauser is probably the best expert on this forum and you haven't provided the schematic he asked for.

    While my suggestion about the re-seating of the Snap-In module (I've seen a poorly seated Snap-In module cause this exact fault) may not solve your problem, you don't say whether or not you actually tried it. A photo can't reveal proper seating of the module.

  5. Your program is a bit of a mess. You cannot communicate with two different devices over MODBUS IP using the same Socket unless you specifically disconnect from one before connecting to the other (and waiting for the fairly lengthy time for the disconnect and connect to properly occur. But with 8 Sockets available, there is no need - use two different sockets.

    Also, do NOT place two logic networks in the same ladder rung as you have in rungs 8 & 12.

    Make sure the IP addresses and Port numbers are properly aligned between Master and each Slave.

    Your logic appears to disconnect from the slave instantly upon connection (and in the same PLC cycle!). That can't possibly work.

    Please be sure all the operands in use are labeled if you want someone else to review your program. It's unnecessarily difficult without labeling.

    And this is just a guess, but you seem to be writing your program like your PLC is a computer, which executes each step of the program sequentially from beginning to end with each step completing before the next step is executed. A PLC is different - it's a loop. The PLC does not interact with the outside world, or even its own I/O until the entire program loop has been completed. The basic execution in a PLC is as follows (one scan cycle):

    1) Read all inputs

    2) Execute ladder

    3) Write all outputs

    4) Repeat infinitely

    There are more complexities, but this is the basic cycle which you must keep in mind while writing your program.

×
×
  • Create New...

Important Information

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