Jump to content

Isakovic

Privileged Member
  • Posts

    192
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Isakovic

  1. 1. I don't think you need to have port 502 on your side on any socket for Modbus to work as master. Try it out. 2. In rung 5, MB4 should be set, not reset. It should be reset after Modbus block in rung 6.
  2. Alternative to this is using "Struct" function. This is how I see it, someone correct me if I'm wrong. Vector length is number of 16 bit registers that is taken in memory, MI is 16 bits long. So length 4 means 4 MIs will be written into. In your case you write into ML which is 32 bits, so you are overwriting 2 consecutive MLs. I guess that is happening, because when I do it I read all needed into MIs and use "Struct" function to pack read registers and form what I need. This way is maybe better in some cases because you have control over the data you read. ML register are signed, so if you read the number of pulses or whatever from your servo that is always positive you can overflow it and go into negatives for large numbers, in that case you need DW register as your destination ("Master:Start of Vector"). I use this method when reading floats from power meters, because you can't write directly into MF. If your method works and gives you what you need than it is correct and you don't need to change anything and complicate things.
  3. Try to increase "Every Period" time, that helped me in similar situation. I don't know if it is still a thing in UniLogic like in VisiLogic, but also break rung 5 into more rungs. Cramped rungs used to make issues.
  4. In rung 9 try calling connect function over a transition contact. Also looks like you are connecting to 2 slaves simultaneously over the same socket, I think this won't work, you need to connect to first slave, run Modbus commands, disconnect, connect to second one, run Modbus for second one. Or use two sockets. Tell us how it goes.
  5. Do it elegantly as Flex said or: 1000 0000 0000 0000 0000 0000 0000 in decimal is 134217728. If you store this number in DW150 4th bit (or 28th depends how you count) will be zero. I remember working with older ladder software that didn't have bits manipulation. If you needed to make a certain combination of 1s and 0s in register, first you reset register (store 0), than if bit 1 is 1 add 1, if bit 2 is 1 add 2, if bit 3 is 1 add 4, if bit 4 is 1 add 8.... Good times.
  6. That is the best way to do it. Function that packs bits into registers is called "Struct", you can find it in "Vector" tab.
  7. Maybe try updating with NTP server. There was this topic some time ago.
  8. If you have a program that is on the plc you can read DT values and export to Excel via UniLogic.
  9. If you mean firmware update, look Help -> Firmware, as Alex said. If you mean transfering new project to PLC this is also possible with USB stick, look Help -> Downloading/Uploading a Project
  10. I think if you make an array out of a tag you write into, it will read consecutive registers to fill the length of an array. I also had to look up the topic Alex linked this morning because I got stuck on the same problem as you did. In VisiLogic you didn't have to swap bytes, just combine two MIs into an MF with Struct.
  11. Compared to working configuration I once did, all settings are the same except nothing was checked in the client area and "Inactivity timer" was set to 20. Also value 310 was stored in SI145 on startup. You have address 10.20.40.202 in Ethernet settings, maybe it's a typo.
  12. I think it's time PLC waits to resend message after unsuccessful communication attempt. SI 101 is system register for TCP/IP time out. You should be able to set it from ladder.
  13. When I needed Z pulse for positioning, I had to give a whole HS channel to it (one input was wasted, had to stay unused).
  14. This question was asked several times and there is no solution as far as I know. It looks like what ever you do in settings, processor usage progressively goes to 100%. I had to switch to Modbus, which is a shame because UniOPC is a great tool.
  15. I guess that too would be unstable. Why do you need unsymmetrical Proportional band? Is overshoot too big if you want it to be more aggressive when temperature gets too high? Maybe try parameters that give softer approach to setpoint. I don't know what kind of process you control, but with temperature it helps to turn off integral part when output reaches 100%, there's a function block for that.
  16. Maybe if you set up logic to change P parameter when temperature rises over setpoint. Although that would probably be unstable.
  17. You should provide more information. Can you post program or screenshots of your routine and serial init function blocks? Which PLC are you using? Are com parameters the same on both PLC and meter side? Did you set DIP switches for RS485? There should be examples under Hep menu in VisiLogic.
  18. Copy DW50 into some other location every scan. Then copy back at startup.
  19. I did a few, but they work on local NTP server. I guess logic is the same for server on the internet. You need an UDP socket on port 123 for RFC-1305 function. You can try building it from the example program, if I recall correctly program from the example worked when I tried it out. Also you need to have a logic for daylight savings time. I attached a snip because rest of subroutine is a mess because I needed to switch a socket to UDP for time update and then back to TCP and that's a lot of gymnastics. If something goes wrong RFC returns 0 and resets the date so that's why there are Lower and Upper limits.
  20. There is a "Remote Operator" app for mobile phone for Unitronics PLCs. I don't remember if it works with Jazz, maybe someone can confirm this.
  21. At the end of program (at the end of every scan) copy those registers into some other free DWs. Then at startup copy them back, via SB2 contact. I think there should be a complete example of this method somewhere in this forum, I've seen this topic before.
  22. Read value and add to sum, then increment a counter to read next value and so on. Shouldn't be a massive code. You can use "Jump to Region" to loop it so it is done in a single scan.
  23. Pt100 are resistive probes, error could be in cable resistance (if cross section of those 3 wires is not the same), in some bad contact or EM interference. If those 2 °C is static error you could add offset in the program to take it into account or try filtering it.
  24. You don't need linearization for PT100. Module itself does that and gives you result x10 (value 123 would be 12.3 degrees). You just choose °C or °F in hardware configuration.
×
×
  • Create New...