Jump to content

Flex727

MVP 2023
  • Posts

    3,263
  • Joined

  • Last visited

  • Days Won

    237

Everything posted by Flex727

  1. Yes, you can connect to two different PLCs without connecting/disconnecting manually. In the master, you just need two ladder rungs, each with a socket connect FB, making sure to have the correct IP addressing in each. Then you need two separate data exchange FBs, one for each PLC. It works best if you have a polling timer, rather than trying to execute the data exchange on every single PLC cycle. I usually use a 100ms timer. Also you need to initialize both sockets with the correct protocol and port number. Make sure the Port numbers match between the master and slave for each socket. Go through every FB you're using and make sure all the IP, port numbers, and socket numbers are correct - it's easy to miss a setting. By the way, when others mentioned connecting/disconnecting manually, they didn't mean anyone has to be physically present. It just meant performing a disconnect in the ladder logic to one PLC and then connecting to the other rather than simultaneously connecting to both. This is rarely done but is sometimes necessary when connecting to more than 4 PLCs since there is a physical limitation of 4 sockets with the Vision PLCs, except for the V700, which can have 8. The UniStream is basically unlimited.
  2. I will amend this to say, "You must use two different sockets to connect to two different PLCs at the same time without disconnecting and reconnecting (as Ljuba was trying to do).
  3. bbird suggests a good workaround. I fully understand the issues with binary-decimal conversion, but I've personally never seen the problem you experiencing. I would request that you post the rest of your code and let's take a look.
  4. Make sure you're not overflowing your Memory Integer. Just to be sure, use MLs instead and see if the situation improves.
  5. It seems to me that you could account for the reset of the PLC with the proper math at startup. SB 2 is handy to execute some instructions on the first PLC cycle only. Unitronics personnel often browse these boards, but I recommend emailing support@unitronics.com if you want to be sure you get some immediate help.
  6. This is likely due to the USB-to-serial driver issues.
  7. Is it possible for you to use a State Machine instead of recipe drum?
  8. Since the PLC RTC is being synchronized with an external clock, why not create your own SBs based on the RTC? Run a 10 or 100ms timer that indexes a counter that gets reset by the RTC seconds.
  9. I've let this run for hours now. MI 19 hasn't budged (though it changes at each reset), but MI 21 still bounces around randomly.
  10. Just a data point for you: I didn't have a Samba readily available so I downloaded into a V700. My scan time is less than 1ms. You are correct that there is some variation exhibited with MI 19 & MI 21. I am seeing MI 19 sitting at 4 with no variation and MI 21 is ranging from -3 to 4. MI 19 seems stable and MI 21 seems to jump suddenly to a new value after sitting at a value for some length of time. Based on your code, I would expect MI 19 to be 0-9 (depending on where the RTC is at power up), and indeed I see it at a rock solid value that is different each time I reset the PLC. I would have to give some thought to MI 21 to understand why it seems to be jumpy. By the way, I deleted the Store to SI 0 before testing on my V700.
  11. For MODBUS addressing, go to the Help file in VisiLogic, click on the Contents tab, then expand the following: Communications / Communications FBs / MODBUS, then select any of the topics you need to read up on. For addressing from an external MODBUS master, select Slave Addressing.
  12. I've never had to deal with the kind of clock accuracy you're needing here so this is interesting. I can't imagine that SB 15 would be based on anything but the RTC, so in theory they should be exactly the same. However, I would ask what is your Scan Time (SI 0)? You must keep in mind that the PLC communicates with the outside world only once per PLC scan. A lot can happen during that scan. You might be able to overcome this to some extent by using interrupts and immediate reads and writes. Also, in my experience, the built-in PLC clock is not usually an extremely accurate clock. They drift pretty rapidly.
  13. Why do you re-initialize your COM INIT 1 with each press of Plus/Minus and on MB100 Force Send? This may be the source of your problem. Also, unrelated to your problem, but you do not need ladder rung 12. Just SET the Power-Up for SB 168 - no need to SET it on every PLC cycle.
  14. Do you have 24V power connected to your E3XB snap-in module?
  15. Ofir was referring to the Help function in VisiLogic, not the Unitronics website.
  16. By the way, there are a large number of example projects included with your VisiLogic installation which show you how to do common tasks. There is also a very extensive Help file with examples. Further, there are You Tube videos, made by Unitronics personnel to teach the basics of VisiLogic programming. (I'm not trying to discourage you from posting here, but you may find those resources very helpful)
  17. No! You need to know if the analog output is 10-bit, 12-bit, or 14-bit. If 10-bit, the value of MI 0 should be 0-1023, if 12-bit, 0-4095, and if 14-bit, 0-16383. You don't need to write to the analog output, just assign a value to MI 0.
  18. Just use contacts for digital inputs and coils for digital outputs.
  19. Is there some reason you need Immediate Reads and Writes instead of the regular kind?
  20. Using an SD card to store the values may be a bit cumbersome and slow. You can easily have a Data Table in the project with 1000 rows and read or write whatever data you need to or from the table.
  21. There is no need to reset total sessions or acknowledgments, though you can if you are using the numbers for some purpose.
  22. Yes, I noticed that change somewhere around VisiLogic 9.5 or 9.7. It only happens with certain color combinations. I'd like to see it fixed also.
×
×
  • Create New...