Jump to content

Flex727

MVP 2023
  • Posts

    3,259
  • Joined

  • Last visited

  • Days Won

    236

Everything posted by Flex727

  1. Make sure you're not overflowing your Memory Integer. Just to be sure, use MLs instead and see if the situation improves.
  2. 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.
  3. This is likely due to the USB-to-serial driver issues.
  4. Is it possible for you to use a State Machine instead of recipe drum?
  5. 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.
  6. 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.
  7. 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.
  8. 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.
  9. 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.
  10. 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.
  11. Do you have 24V power connected to your E3XB snap-in module?
  12. Ofir was referring to the Help function in VisiLogic, not the Unitronics website.
  13. 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)
  14. 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.
  15. Just use contacts for digital inputs and coils for digital outputs.
  16. Is there some reason you need Immediate Reads and Writes instead of the regular kind?
  17. 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.
  18. There is no need to reset total sessions or acknowledgments, though you can if you are using the numbers for some purpose.
  19. 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.
  20. It looks like you have a number of problems that are easily resolved. 1) In the master, use a polling timer so that you are not trying to exchange data on every PLC cycle. I know MB 201 will prevent that, but a few extra milliseconds generally helps with MODBUS IP. I usually poll at 100ms intervals, but you can go much faster if you absolutely need to. 2) In the slave you do not need to configure socket 2 - you are scanning on socket 3. 3) Also, you are using SB 149 to gate your SCAN_EX FB - this will prevent the SCAN_EX FB from being executed. You should be using SB 146. 4) You do not need the SCAN_EX FB for the SCADA in your slave PLC.
  21. You have several alternatives. You can use latched bits and SET & RESET them appropriately or you might see if a TE timer would serve your purposes better (with slightly different triggering logic), or there might be other options depending on your overall logic.
  22. Does something turn off MB 71 when the output reaches max value? If not, you are incrementing then decrementing on each PLC cycle, thus leaving the output unchanged.
×
×
  • Create New...