Jump to content

Joe Tauser

MVP 2023
  • Posts

    2,855
  • Joined

  • Last visited

  • Days Won

    308

Everything posted by Joe Tauser

  1. Yes, it can be done with the Protocol block. You'll want to get more familiar with the specific strings needed to interface with the Mitutoyo by first using a raw terminal program like Brays terminal to get what you'll need to implement into the PLC program. https://sites.google.com/site/terminalbpp/ Find a computer that still has a serial port, install the terminal program, connect it to the counter, and start sending codes to figure out the response format. Joe T.
  2. Unknown. Modbus registers that start with a 3 are a throwback to when Modicon PLCs were a force to be reckoned with. Analog input modules were known as "Input Registers" and took the form 3xxxx, as you have listed. It was Modbus command 4. I looked through the Help and I don't know how the SCAN_EX block is going to handle this request. With any luck, it will lump it into the Holding Register class (4xxxxx) and everything will be peachy. This is one of those things you're going to just have to try and let us know the results. For now, store the value of MI 3 into MI 29 and fire up your system to test it. Joe T.
  3. You can't do the Data Tables read from a SCADA system. It is a Unitronics PLC to PLC function only. MIs map directly to Modbus addresses, except they are 0 based. To read MI 0 you would instruct your SCADA system to read 40001. If you post the table of Modbus registers you need to read we can translate it for you. You'll have to write logic to get the data in the right place. Joe T.
  4. This problem dates back to when the USB to serial adapters were first introduced. It is not a Unitronics-only problem, it's a Windows thing. I have experienced multiple instances of the same driver trying to access the same COM port when it comes to the USB interface. It is a royal pain in the butt and you have to rip them all out and start with a clean slate. The problem is you can't see them all, even if you check "show non-present devices" in the Device manager. There is an environment variable you have to set to truly "Display All Non-Present Devices". This article describes the process to get all your defined COM ports to light up- https://technet.microsoft.com/en-us/library/ff184583.aspx You probably have a bunch of stuff defined that you didn't even know about. Uninstall all the COM ports. Then plug your PLC in and see what happens. Joe T.
  5. The Snap IO modules are an older design and require a separate bit to "turn on" the high speed output. The IO-DI16 is a newer product and the output will turn on just by calling its address. Is this a new installation? I would totally recommend the V560 if it is - color and much more power for $200 more. Joe T.
  6. There is no crap while the program is still in the development stage - only un-molded clay. Post what you've done and we can help you understand timers better. I wrote the code I did because you want to do mathematical operations with the timer values, and that's not intuitive on time values. Under the hood, the PLC counts in 0.01 second increments. The approach may be to use timers at first so you get used to working the the HMI. Joe T.
  7. Yes. I have a standard policy that my code never works right the first time! Hence the comment "get you started". I assume some intelligence on the other side to take what I've done and run with it. Martin - It sounds like you want a timer like you'd buy at the store for cooking, where you enter the time and it counts down from there. We can't do that in Unitronicsland with a standard timer. Sorry. First, if you look at the timers and counters variable type you can either display the preset or the remaining time. One variable can not display both. You need to understand that the code I posted does not use timers and counters at all, and the point of using SB 13 is that you are making your own timer to get the functionality you want. Do not try to link standard timers and counters to it. Post the .vlp program you've been working on and I can hack it a bit. Joe T.
  8. Use the bit in combination with SB 13 and an Increment block on an ML: I'll leave it as an exercise your you to break the accumulated seconds into hours, minutes, and days. Joe T.
  9. You don't mention how you want to reset the timer. You need to make your own timer to get it to behave the way you want to. Use an MI or ML as an accumulator. The easiest way to get the preset is to use separate MI's on the HMI screen and combine them into a preset value. Then decrement the value with the internal second pulse SB 13. This should get you started: Joe T.
  10. It would probably be cheaper and easier to get a small HMI talking Modbus and just put the number on the screen. Joe T.
  11. You need four outputs per digit, so four digits is 16 outputs. You would use a NUM to Bits block to drive your coils. Your display should have four sets of 1,2,4, and 8 inputs. I've never used Num to BCD, and the Help is lacking a detailed example. It probably re-arranges the bits so they work with BCD displays. If it's important I'll load a PLC up and figure it out. Joe T.
  12. I've seen that mysterious hiccup on remote systems. It happens very rarely, but once is enough. I've also seen inductive spikes caused by large contactors or other devices find their way via I/O wiring into the PLC and cause it to reset or the watchdog timer trip. Do you have any power line filtering installed before the PLC power supply? Is your low voltage and high voltage wiring adequately separated? Joe T.
  13. That particular time is built in to Visilogic. Use a contact referencing SB3. It is on for .5 second and off for .5 second. Otherwise, you do need two timers. Here is a 1 second on / 1 second off example: Timers automatically reset when you remove power from them. Note that proper programming form is to use the timer bit in a separate network from the timer coil. The reason for this is Visilogic doesn't always compile the network they way you think it does. Joe T.
  14. Did yo try the Filter function block yet? While the ladder diagram is displayed, go to FB's -> Filter. You'll have to set up a Configuration block before you call the Calculate block. I've uploaded an example. Joe T. Filter example.vlp
  15. There's no entry needed for the EX-A2X. It's assumed you have one, as nothing works without it. The V200-19-ET2 is the Ethernet Card. This is initialized in the ladder logic - read the Help on Card Init. The proper part number for the digital module is IO-DI8-R08. This is in there. Joe T.
  16. The powerup value is an individual setting. You can do larger chunks using SB2 and Fill blocks. How many things do you need to reset? If you post your code with more specific details I can put some resetting code in for you . Joe T.
  17. The particular modules are not assigned any kind of ID; they're not smart. As long as the right module type is in the right place in the module string you'll be OK. Joe T.
  18. You've learned that SB24 blows everything out and causes the PLC to reboot. Stay away from it. If you look at the memory table at the bottom of the screen you'll notice a column with a little electric plug looking thing. No, it's not a bell. This is for setting a power-up value. Enter "0" into the MIs and "Reset" into the MBs you want to clear. Joe T.
  19. There are a couple of ways. Take the SB3 out as that doesn't address the problem. When you say "linearization table", did you really make a table or are you using a Linearization block? Is the sensor output linear or non-linear? First, start with the filtering property on the hardware setup screen. If that's not enough, look under the FB's menu at the Filter function block. Take the output of your scaling and use it as the input of the Filter block. If you post your code we can have a better idea of what you're doing and make some edits for you. Joe T.
  20. If you wish to post your code we would certainly be happy to review it and make suggestions. Joe T.
  21. Antonio - how many PLC ladder programs have you written? Sometimes we get a long thread going without realizing we are catering to a new programmer who is trying to do something in what he thinks is the best way but is really something based on another language style. Often there are functions that simplify the task significantly. Please give us more specific detail on what you're trying to do. Joe T.
  22. Note that SB33 is for a "Standard Vision". Translation: "Old PLC we still sell". SB33 does nothing in your Samba, which has the newer platform and is referred to as an "Enhanced Vision". Joe T.
  23. Is the code in a subroutine that is not being called? Joe T.
  24. I had to look this up. According to the Help, here is the detailed scan order: 1. Read Inputs 2. Solve ladder program, starting with Main 3. Write Outputs 4. Service HMI screen - update variables, run subroutines associated with display, process keyboard input 5. Process Communications Repeat So the subroutine associated with the display runs after the Main ladder program and its subroutines are solved. Good question. Joe T.
×
×
  • Create New...