Jump to content

Flex727

MVP 2023
  • Posts

    3,259
  • Joined

  • Last visited

  • Days Won

    236

Posts posted by Flex727

  1. 1 hour ago, Ondrej Fedorcak said:

    can you confirm, that when the battery dies, the variable parameters got lost? - does this happen every time?

    Yes, operand values are lost when the battery dies and mains power is removed. Keep the PLC powered up and the battery is irrelevant. There is a system operand that warns when the battery is low.

    To replace the battery in a V1210, simply open the battery door on the back, pop out the old battery, and pop in a new one (CR2450). No need to shut down the PLC.

    It is also possible to save the operands on an SD card if the PLC program has been set up to allow that. There are also other programming techniques to retain specific operand values.

  2. 2 hours ago, Fernando Castro said:

    Or somehow manage some type of disconnect/reconnect sequence which at the very best will be  finicky.

    I have a V1210 in the field that connects to 15 different devices using MODBUS TCP with a single socket with this technique. It has been working flawlessly for 10 years without a hiccup. It takes a little over a minute to work its way to all 15, but it's functional.

  3. Moved to the Vision forum.

    Yes, you can connect with USB. Obtain and install VisiLogic, install the USB driver from within VisiLogic, then you can connect with a mini-USB cable.

    However, it is unlikely you'll be able to download the program to your PC. The program would have needed to be downloaded with the upload feature, but that is not the default.

    Go to the pinned posts in this forum (Vision) to learn how to do all this and review the VisiLogic Help once you get it installed.

  4. I currently have 11 different VisiLogic versions installed on my desktop and my laptop and it all works flawlessly. When setting up a new PC, I follow this procedure:

    1) Install the oldest VisiLogic version first, then rename the folder in C:\Program Files (x86)\Unitronics\Unitronics VisiLogic_C to something else (such as Unitronics VisiLogic_C - 9865, for version 9.8.65). The folder name is what will show up in Version Swapper so you want to be able to recognize which version you're swapping to.

    2) Install the next oldest version and repeat until all versions are installed and renamed.

    3) Use the Version Swapper from the newest version (VisiLogicVersionSwapper.exe)

    I think the "swapper versions" available online do not need to be installed - just unzipped to the Unitronics folder (not sure).

  5. Also, all the warning messages regarding changing a bit and then reading the value in the same net indicates to me that you are overcrowding your ladder nets. Keep your nets as short and simple as possible. Break them up into smaller chunks whenever possible. The only thing you have to be mindful of is that coils cannot be duplicated (except for Set & Reset coils) and must have assignment in one ladder net only.

  6. The compile error tells you exactly what to do. Cut half the ladder rungs from the subroutine and place them in a newly created subroutine then call that subroutine immediately after the original one.

    I see that the problem exists with the Main Routine. I don't have version 9.9 installed yet so I can't look at your program, but if your Main Routine is too big then you have serious problems with your programming style. Subroutines exist to break up your code into manageable chunks, typically separated by function. The Main Routine should only have configuration function blocks, as needed, and the called subroutines. You shouldn't be putting your entire program into the Main Routine.

  7. 3 hours ago, ZebioEE said:

    Use dedicated SD card, an artificial solution, additional  hardware just to fix failure of PLC . Is like add to you TV disel generators.

    This is silly. You want flash memory to store data in the PLC? Unitronics has supplied the facility for adding flash memory to the PLC. An SD card is just additional flash memory for you to use as needed or as you see fit. Nothing artificial about it.

  8. Multiple problems:

    1) Get rid of ladder rung 2. The SCAN_EX FB is for when the PLC is the slave.

    2) With MODBUS you need to CONNECT to the slave device. Check the example projects that came with your VisiLogic installation to see the proper procedure for performing the connect function.

    3) It looks like your vector that receives the data, starting at MI 12, is of length 4 yet you do not have 3 additional unassigned MIs for the data to go without overwriting MI 15.

  9. 40 minutes ago, Santiago PB said:

    1. as you can see if we put that option, socket 3 / it should work as salve, and we need to be master.

    The Socket Initialization FB determines master or slave. Ignore the "Default:" statement in the MODBUS configuration FB. It is true that is the default, but the Socket Initialization overrides.

    43 minutes ago, Santiago PB said:

    3. Is this configuration enough or correct?

    1. Which socket should we use, if we see that this options do not set it as Master?

     

    You can use any of the 4 sockets for any purpose. Just initialize them the way you want them. It's best not to have two or more sockets set to the same port number.

    47 minutes ago, Santiago PB said:

    4. About Modbus IP read holding register

    1. Can you see why it has not answer if the slave is ok and available at the network? (we tested the IO Link master device (as slave confirmed) communication with modbus poll and works fine). 

     

    As I said, you appear to be using Socket 3 for your comms, but you are configuring your MODBUS to use socket 2. Change the MODBUS configuration to socket 3. And again, ignore the "Default:" statement that appears there, just choose the correct socket number.

  10. Many years ago (many, many) when I was young and stupid (okay, slightly less stupid), I had some confusion about PLC Ethernet comms (didn't we all?). I had the need recently to have another look at a program I had written back then. This program, running on a V1210, exchanges data with several V570s simultaneously using MODBUS TCP. Each connection uses a separate socket, but all 4 sockets were initialized with the same port number, 20257. This program is still in the field and running flawlessly. My question is, why? How is it possible for the communication to work properly when all the sockets have the same port number? How does it all get sorted out properly so that the data ends up in the correct place?

×
×
  • Create New...