Jump to content

Isakovic

Privileged Member
  • Posts

    192
  • Joined

  • Last visited

  • Days Won

    13

Everything posted by Isakovic

  1. Also, you don't need linearization. RTD inputs measure temperature directly, register will have a value of temperature x10 (102 C is 10.2 C).
  2. You set up encoder in "Hardware configuration". There you select for high speed inputs "shaft encoder" x2 or x4 and assign memory location to it (use ML or DW instead of MI because it has bigger range). Note that if you select x2 you will have a value of 200 for full turn, and if you select x4 you will have a value of 400 per turn. It will also increment in one and decrement in other direction. All other logic you will have to work out in ladder. How many impulses per mm, presets... All the best,
  3. I can't think of a way of making a dynamic piechart. Maybe you could make 8 bargraphs for the same result of visually comparing relative values because they allow dynamic min/max (0 - minimim, sum of all variables - maximum).
  4. I almost had a chat with a guest while chat room was still available.
  5. It looks correct (you even have a response for every command you sent to slave), but value to force is 0. Force coil command is reading status of MB6 (0 or 1) and writing it to slave when command is called. If this command is always writing 1 use SB1 (always on) for "Value to Force". You can write just 6 in destination address.
  6. You should definitely try breaking it into several nets, it looks like it should work from STL though. I wish you could set parameters for serial communication on Vision in MIs. I think you need RS485 card for Sambas, it's standard for Visions.
  7. They look like circuit boards from inside old consoles cartridges.
  8. I couldn't find any reset coil elements for timers in ladder. Are you resetting it by not calling a subroutine? Someone correct me if I'm wrong, but I think that nets in subroutines won't get updated if subroutine is not called (so bits that were 1 when program last time passed through subroutine will remain 1). I find this not intuitive so I usually run through all routines from main and use bits as conditions. Maybe your program will work if you used reset coil for timer.
  9. I tried reading UTC from PLC and got the same one day lag with that formula, but PLC has correct date data. Must be leap year missing a day every 400 years or something like that, there must be a code for conversion somewhere. Why don't you put date into data table as integer or string? (I regretted it every time when I put it as a string)
  10. I had a quick look, maybe I could give a few suggestions. - Use Scan_Ex block and separate all those functions into separate blocks (one net for config, one for scan etc.) - You are calling connect block after every Modbus operation, maybe try calling it via transition contact only when Socket that you use is not connected. Tell us back how it goes.
  11. - Make a new Variable with that MI in it. - Select part of the screen where you want this MI to be displayed, then right click -> Attach Variable - Input will activate whenever you navigate to that screen. If you want to have input only when you press a certain key (usually enter), you'll need to make a logic that will set SB39 each time you open a new screen, and reload a screen when enter (or whichever key) is pressed. I think there's a topic about this in forum somewhere, maybe even in examples in U90.
  12. Looks like this is always the case with energy meters. You use "Struct" block under Vector -> Struct for merging those two registers into a float. There is an explanation for struct block in help file. After that use math function blocks for floats to extract the values if you need them converted to int.
  13. Hello Rog, What do you mean by taking out IP address? After net 6 is executed what status do you get for Socket 1, 19 or 23? As Flex said it should work the same regardless of controller used, V570 or V700.
  14. Status 23 means it is connected. You run connect block when Socket 1 is connected in your logic, it should be MI2 not equal 23. Also, nets 4 and 5 are the same.
  15. Hello Aus, I also set SB168 at power up, I tried messing with system bits but that didn't work. What I found to work is next sequence: - Init Socket 3 to TCP master (port as before 20259) - Delay 2 seconds - TCP connect on Socket 3 to timekeeper Server on port 123 - Delay 2 seconds - Init Socket 3 to UDP, port 123 - Delay 2 seconds - Whole update sequence - After 1 minute Init block to restore Socket 3 to original settings I don't know why it works, but it works. Hope this helps someone.
  16. This is what I found: It will work normally as long as no TCP connections take place on Socket 3, like accessing from VisiLogic or Remote Operator. As soon as PC connects at least once it will not work until PLC restarts. It doesn't matter if PC-PLC connection disconnects normally or it is violently broken. I don't know how to clear whatever PLC set in its memory. I tried closing the socket and then initializing it to other TCP and even this Modbus workaround Javier did but it doesn't work.
  17. Hello, I'll revive this topic because I ran into a similar problem and seek advice. Does anyone know what are the codes for socket states? I also have to reuse a socket but protocol remain the same (0=PC applincation). Socket 3 at the beginning is TCP / Port 20259 / Server, then, at 4 o'clock every night, initialized to UDP / Port 123 to update the time and after that reinitialized back to TCP. It works fine for the first time (after PLC restart), but every try after is unsuccessful. Socket 3 state is 34 and there's no explanation in help files about socket states that I could find. When RFC function runs, Tx counter increments by 1, Rx remains the same for Socket 3. Other controllers that have UDP port dedicated for this purpose (no init block after startup) don't experience this problem. I'll fiddle with troubleshooting some more to find a workaround if possible in the meantime.
  18. I didn't even know this RTC freezing was a thing. I'm updating time sensitive application right now. Is it smart to let UTC functions run in every scan? Can you rowhammer the clock or something?
  19. I tried breaking NET 86 into several smaller ones and making it simpler, It couldn't been done in one NET anyway. It's always better to have simpler nets, I learned it the hard way. I don't have much free time now to work out the logic of the whole thing (like when should T1 start counting), you'll have to test if this is what you were looking for. I'd also suggest breaking programs into smaller subroutines, so you'll have Main routine (with optionally couple of nets for config blocks) calling other subroutines. Much less scrolling. Also, I see you went with SB15. Tell us how it works, and what precision you got. All the best, 59c0a61fb1bec_Sheetfolder.vlp
  20. Type Unitronics Belgrade in Google. As close to Kosovo as it gets.
  21. This EVENT block is new to me. Glad I found it. I always used ladder with mesh of timers and indexes to achieve such scrolling through messages. This is much more elegant.
  22. Well, you could put SB15 (transition contact for 100ms pulse) and input in series and use it to increment a counter. When input goes low multiply counter value by 10 (because timer value is in units of 0.01s) and store the result in timer via "Store Timer" function block (under "Store" tab). I'm not sure about precision you can get from this. It may work ok for your application or it may be way off. As Visco said encoder is the best solution.
  23. In U90 you have to build accumulated timer with ladder logic: https://unitronicsplc.com/Download/SoftwareHelp/U90LadderKnowledgebase/Timers/Counting_accumulated_time.htm In Vision controllers you can use accumulated timers.
  24. Is there any way to remove "Add new subroutine" button? I often click on it when I want to add a new net.
×
×
  • Create New...