Jump to content

Isakovic

Privileged Member
  • Posts

    192
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Isakovic

  1. Maybe try using an auxiliary data table as a buffer for reading/writing instead of modbusing directly tables PLC uses for logic. That way you can verify if data is valid, if not repeat synchonization. This may slow down your process if mistakes are frequent.
  2. I guess it should work, I never tested it with my own PC. In the ladder before MB2 you can place condition DW0>3000000 so it won't update unrealistic time. I think you also need to account daylight savings time and your time zone (this comes down to adding Nx3600 to DW0).
  3. If I understand manual correctly this Master Clock can work as an NTP server. There is a function in VisiLogic called RFC-1305 for time synchronization with NTP server, there is also an example. It works fine, but if something goes wrong and server returns 0 it will reset PLC clock to midnight 1.1.2001. Just make sure to have some logic preventing this. Or if wiring allows it use digital input as Ausman says, that will take less programming time and be pretty accurate for this case.
  4. Oh I see it now! If the PLC and Hama are powered from the same supply both CH1 and GND on the PLC module will effectively be on the ground potential. Now I suspect AI08O also has GND and negative power terminal connected, so switching terminal places would not work. But will it work if separate power supply is used only to power Hama (not referenced to the ground), and other supply is used for current loop and PLC?
  5. I'll jump into this discussion because I am little confused here. More so after reading other quoted forum posts. Why wouldn't HI 98143-20 work? From the technical description I would wire it like this: Like any other two-wire 4-20mA transmitter. Is something not right here?
  6. You can search this on the internet for detailed explanation. It means that Integral component has maxed out over time and is contributing 100% to PID output. Maybe integral time is too slow or system cannot reach setpoint fast enough. If this makes oscillations or any other problems you can force Integral component to take some other value, there is a function block for that in PID menu.
  7. If there is a possibility of cylinders colliding might I suggest using position sensors or limit switches as conditions in your program. It shouldn't be a big investment, but it will be safer than only timers.
  8. The way that Sargani explained in post number 2 should work. Yes you can (and should in this case) read several registers in a row. If in "Modbus Master" setup you define tag as an array of 16 bit integers, let's say of length 10, PLC will read 10 consecutive registers from Modbus Slave. Can you post part of the program with code for making 32 bit float from 16 bit ints, with setup for Modbus so we can help you find the problem?
  9. Hello, I need to add two columns to an existing Data Table, in VisiLogic this can be done without losing values, I'm not sure how it works in UniLogic, I remember once editing it and all values went to 0. Can I add a member to Data Table struct and retaining values in old columns? I would back up old table, but problem is that I can't read the values in online mode and back them up, I get this error: Connection to plc was over Ethernet, ladder works normally in online mode so I wouldn't say it's a connection issue. If new columns cannot be added without losing values, my second question would be: Is it possible to read values via UniApps and save DT to USB stick?
  10. I like your style. It's more efficient, I have separate bit for every Modbus command. Will give this method a try.
  11. I'll explain the problem I had, maybe it helps somebody. I have several controllers that need to have synchronized RTC, and there was a problem that time update didn't work properly. After some troubleshooting I found that "Status" variables need to be defined in order for function blocks to work. This does not work (usually): This does work: Both cases compile the same without error or warning. UniLogic version 1.28.34 PLC USP-070-B08
  12. Here are my suggestions. This part here: If no connection is established due to some reason, T0 will stay on and PLC will not try to reconnect again. T0 should restart if there is no connection after some time. Since you do both master and slave pack all registers that you need to read from slave one after another and then read them all at once with one command (Vector length 24 in read command). It's more efficient than reading them one by one. About SB168 I always Set it at startup as suggested and Set SI103-106 to 200. Don't know how it behaves if values are left blank. I'm curious does your method of calling Modbus commands works? Have you tested it?
  13. I suppose this is because of differences in how memory is organized in Visi and Uni. But if it can be done it would be great.
  14. This could have inspired that Note. I remember reading an old topic about user objecting that timers which have unused contacts should generate warning message after compiling, now timers with unused contacts do generate warning after compiling.
  15. When doing system upgrade for Vision PLC, there is a message while OS is being installed: For System Upgrade PC should be connected to PLC via COM 1 Should be, or has to be? OS can also be upgraded vie Ethernet, so why is it recommended to be done over serial port? Why is this note there? Is it technical reason or practical, like if something goes wrong PLC will be in your reach and you won't have bricked unit in remote location.
  16. I'm not sure about reinitializing Configuration FB. It does have addresses for only 15 slaves, but if I remember right when you execute read command it will read from whichever slave the PLC is connected to, disregarding the "Slave ID number" that is in the read command. Maybe this was an issue from some older VisiLogic version when I encountered this for the first time. I've wanted to test this for some time now, but don't have the will. So, I tested this. One master reading 3 slaves one after another from the same Socket. No slaves were defined, every read command had Slave 0 and it worked. Turns out you don't need to have defined slave addresses in Modbus Configuration FB. Modbus commands are sent to device which is connected at the moment of execution, no matter what is in the Slave ID field. Should we add slave addresses in Configuration FB or not (I don't see the point since connection has to be made manualy), what is a good practice here? Is it OK to communicate with more than 15 devices without reinitializing Configuration FB, like in newbie88's case?
  17. I'll tell what worked for me regarding your questions, newbie88. Steps go as you described. Connect to 1-Read-Disconnect; Connect to 2-Read-Disconnect... You are using TCP so connection is required. Delay of 0.4 seconds after disconnecting from one client before connecting to second one, and another 0.4 seconds before sending Modbus commands, maybe this can be shorter (probably, you should experiment). For 4 clients this cycle takes 3.9 seconds, if time is critical you may need to use more sockets or go to UniStream. For any slave that drops number of retries and timeout will add extra delay. I'm not sure about reinitializing Configuration FB. It does have addresses for only 15 slaves, but if I remember right when you execute read command it will read from whichever slave the PLC is connected to, disregarding the "Slave ID number" that is in the read command. Maybe this was an issue from some older VisiLogic version when I encountered this for the first time. I've wanted to test this for some time now, but don't have the will. This depends on how you make your logic. If you use that standard form from Examples You can go to next step after all read bits are low for how many read commands you have. I found it works without putting delays between commands, just using "Function in Progress" bit to stop multiple read commands from interfering one with another. Don't forget that system bit that shows if socket is connected should be a condition before blasting Modbus commands. Hope it helps, tell us how it goes.
  18. Great topic. I have a question for eminent wizard kratmel. Is it recommended or not to use different power supplies for main power and output power? If both are referenced to ground I guess not, but what if they are floating? I remember a case when I had safety circuit cut +VO line as a bonus security on Jazz unit. This rebooted PLC when activated so I don't use it anymore. Why was this happening? It was the same supply for PLC and outputs.
  19. Yea, this last version is a little messy. Status 19 means that the socket is initialized properly, when it connects it changes value to 23. Change those port numbers and separate rungs as Flx said and tell us how it goes. If you need to connect from a PC over Ethernet just initialize one socket as TCP slave.
  20. Your best option is to contact the company/person that made the original program. If that is not an option contact Unitronics support directly. Or write program from scratch. If you can't get your hands on the program this is probably what has to be done.
  21. 1. You have correctly initialized Socket 3. What is the purpose of MB11? Looks to me like it has to be switched on manually. Also it is better to call "Socket Connect" block over transition contact. Maybe something like this: It will reconnect after losing connection. In rung 3 you are closing socket after Modbus command, you don't need to do that. Maybe socket status changes to other value than 23 while sending Modbus command and may trigger connect block if it stays like that for more than 5 seconds in this example. You may have to investigate this. Also look into "Keep alive" values for sockets if they suit your application. Generally it is wise to have logic that will recognize connection problems in situations like this and try to automatically clean up what needs cleaning up and connect what needs connecting. 2. 🤷‍♂️ 3. Initialize 2 more sockets. You have 8 sockets available in V700. Manage them the same way like the first one. They can work independently. If you ever need to communicate with more devices than you have sockets you need to make logic to connect and disconnect from various slaves, but that's not the case here. Leave one socket for your PC connection.
  22. Will reusing the same operands (system or standard) in several places in program be a problem? I often use the same memory place as auxiliary variable for several calculations in the same scan.
  23. You can linearise as many analog inputs as PLC has them. You can linearise other numeric values, I don't think there's any limit.
  24. What kind of motor are you using? I don't think it's an encoder issue. From your explanation it seems the inertia is causing inconsistency in positioning. It's hard to drive the system precisely with start/stop motion with relatively fast motor. If steppers and servos are out of question maybe you can try with VFD. To have a significantly slower speed when you approach desired position. Or add a gearbox, if there is space and speed reduction isn't much of an issue for machine performance. Since you mentioned motor with brakes. I had one project where I had control done just as you did here but with braking motor. Precision was 1-2mm (within tolerance for the project), even when carrying heavy load. Brakes wear off fast though.
×
×
  • Create New...