Jump to content

Fernando Castro

Members
  • Posts

    264
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by Fernando Castro

  1. you already got the answers needed. but I think it will be worth to explain the bit shift function. when you do shift a bit, the most left bit goes to the void. it does not continue shifting all the bits in the memory address infinitely, so using an MB and a bit shift of 1 was essentially shifting 1 bit 1 place, if it was 1 then it would become 0 because the 1 was thrown into the void all the following MBS are unchanged because you only shifted the first Bit. shifting by 8 is taking 8 bits and shifting all of those, effectively displacing 1 position on a vector of 8 bits.
  2. I believe you are missing socket connection after TCP/IP Card Init (I am not sure if it is required only if you are not using the standarconfig) . and the correct Offset is : 20492, the 5000 in the documentation is an Hexadecimal value, and I have the hunch that zenon uses a decimal value: 5000h = 20480 DEC : 20480 + 12 = 20492.
  3. I have been working with Unitronics vision series for the last 3 years, and I agree with that statement (And everything has been working fine on my end, never bought the Unitronics PLCs myself and I want to believe that they are cheap at least) . However, have you already tried to download the OS again? Have you tried other methods like Unitronics download manager? maybe the problem is the visilogic software? and as always it doesn't harm to try different computers and or same computer with different PLC.
  4. use Unitronics download manager. is faster than the regular download and is also unattended, just start and let it be. there have been so many times on which I started a download then open some other window to check something quick and just forgot to click on the OK button to proceed with the download. or restart the PLC.
  5. Hey @Gabriel Franco do you have an example of Modbus over UDP? I haven't been able to use Modbus like that, I am not sure if I am doing something wrong or if my devices just don't work over UDP. Is the same? should I Initialize the socket then connect to an IP and then need to use the Modbus functions just polling through my different devices changing IP and Modbus requests? or I need to connect toe each device first without disconnecting? or not use socket connect at all? I was able to use multiple Modbus devices but I have a sequence for disconnecting and reconnecting... I wish the connection time were not as slow as it is. ..other than that, it works.
  6. Usually when something was specifically designed for an OEM there is no other way rather than contacting the OEM (Original Equipment Manufacturer). For both, legal and thecnical reasons: since is not a standar part not anyone in the company has acces to that specific information and also it coild be that the intelectual property or disrtibution rights are only granted to the OEM .
  7. Adding to kratmel post, you have 4 sockets available and as I understood you are only using 2. Come on!!! , this is because for your SCADA you are using MODBUS TCP/IP and remote operator is the proprietary Unitronics protocol. The actual relevant question to your problem is: can you make changes in your PLC program? if you have the source code and you can make the chances you have 2 options: - Add another MODBUS protocol in other socket - Connect and disconnect sockets between servers (Modbus MASTER devices, that is most likely how your SCADA setup is), maybe use UDP instead of TCP for this
  8. Yes, I think If you export a sub routine it will take any operands used inside the function blocks. However, if you are using vectors, It will only take the referenced operands, so the operands won have their names, but you can also export/import operands descriptions. or do a copy/paste multiple operand descriptions from an excel to the project. the only catch exporting/importing is that if I am correct some communication configuration functions require to be on the Main subroutine which cannot be exported, the workaround could be to create a copy of the "Main routine" and export that one. then do a copy paste. another way to do is opening your project, copy all the rungs or functions, then close the project. open the other project and paste it. the copy/paste works in between projects it stays on the clipboard even if you close the file.
  9. Are you sure that is actually what is going on, based on my own experience using Modbus on Unitronics devices and without giving it much more thought It sounds like it may be the endianness. are you sure that you are not getting the Bytes in a reversed order? if that the case the easiest way to fix it is to use swap bytes function block
  10. You need to do the logic to re connect, as the colleagues pointed out there are some system bits to track the socket status.
  11. you need to contact Unitronics support for the instruction on how to activate manually. I think the online activation is no longer working, because some windows thing. Also, there was a discussion about this some months ago.
  12. well, I am not confused about the use cases of the timers and how each one be heaves, I do agree that the documentation is clear in that regard... It gets fuzzy when you start messing with the preset values, and do downloads, backups and restarts as I described. The electrical spikes, and noise makes sense to me, that other device that I was talking about handles high voltage, and I was informed that it self-shutdown, I am pretty sure there was some overvoltage issue which may cleared that preset value which caused the "clear fault" sequence stop working. I am also very skeptical about the quality of the "grounding" in that facility. πŸ™ƒ
  13. MIs are not signed as @Joe Tauser said you could use it: the difference is on how you will use the data in the MI itself 0xFFFF (65535) is interpreted as -1 decimal, from 0 to 32767 range is 0 to 32767. from 32768 to 65538 is -32767 to -1. so, if you will use the value in a math operation or in a counter and it happen to be bigger than 32767 then you need to store the value on an ML or do some math to shift the range but the binary value it will still be the same.
  14. @John_R, @Ausman at least I know I am not the only one that struggles with timers πŸ˜… This Is one of those thinks that I found sketchy when started used Visilogic but I refused to believe, my thoughts were "I must be doing something wrong", but as the years went by, I am just giving up with trying to understand timers on visilogic.
  15. This is a question for the most experienced vision series users out there: What's the deal with the timers? Let me explain: Since using Unitronics timers have been a headache for me. There is a "proper" way to declare and initialize the timer, right? I am assuming that the check box actually resets the elapsed time and the output bits () and seems to be a true statement. If we use the same "logic" as the MI power up value, that means that T1 will power up with preset value every single time, correct? well that has not been the case in my experience. If you override the preset value using online mode and reset the PLC, then it will keep the previous value. If you a "backup and restore" it also will take the preset value from that backup, even if you reset the PLC. If you download from Visilogic you may check or uncheck to download preset values, and it will take those instead of the preset value. still confusing to me but whatever I managed to get used to this using store preset function on power-up bit condition (when I need the timer to behave like that). However today I was troubleshooting a machine that couldn't be started. That particular machine communicates to another device over MOTBUS TCP/IP and long story short, I have a small "reset" sequence that uses a timer to ensure the clear fault bit has been sent before restarting the interlock sequence ( Don't judge me, sure there is a better and proper way to do it but the easiest and fastest way when I did that program was to wait 1-2 seconds after pressing the "reset fault" button, there was no documentation about the "reset sequence" of the device and I figured out by manually pressing buttons... ok, maybe there is documentation about it and I didn't search hard enough but I was in a hurry and it's out of the scope of this thread ). Anyways fast forward some months in, and that sequence was not working properly, I logged in and to my surprise the Preset value was 00:00:00.00 πŸ€·β€β™‚οΈ, preset value in the downloaded project was 1s, and last preset value set was 2s, and I am 100% sure because last week I logged in to that machine to check what time value I used, to deploy the exact same settings to another machine. So, the timer 1 was as follows: and TE1 is not being used anywhere else in the project. I have no explanation on how it was set to 00:00:00.00, I mean there is also not even a vector function that could write directly on timer preset values, right?
  16. I feel your pain. I think I already tried that. if you move your windows around the different monitors eventually some pop-up window will get caught on the wrong screen.
  17. I also don't believe anyone will fix this, and maybe its somehow related to windows, or more likely how the OG visilogic was designed to interact with whatever windows library was used back then, because certainly you can say it's a windows thing, but I haven't had that problem on any other software. πŸ’© Also, at the same time I do believe it is a big thing, and it pisses me off!!, each time I need to troubleshoot machine on site, I grab my laptop and run to the production floor just to face that I cannot change any live value, or search or some specific MIs. πŸ˜‘ And the work around well eventually I made it to work but I forget the key combination each time I really need it and need to go back to this specific post (which is the reason I just happen to see that it is still active). The funny thing is that I have a solid reason to prefer to be working in my cubicle or at home rather to be on the production floor "I am not lazy it's the software that doesn't work properly when I am there!" πŸ˜‚πŸ˜‚. πŸ˜‚πŸ˜‚. that is something that a Lazy person would say. Good look explaining that to the big boss ,
  18. yes, that is correct. but my argument was that there was small chance that you trigger the bit while the scan was evaluating rung 13, then on the next cycle it would evaluate 10, then 11, then 12. however, I tried to prove this theory using some jumps and labels trying to force the routine to end immediately after first occurrence of transition bit like this: But seems that you are correct, my first assumption was wrong (the chance of executing rungs in this order 13,10,11,12 instead of 10,11,12,13).
  19. I get what you are saying but even if each rung takes a given number of ms to be executed, if you use same positive transition in multiple rungss followed one by another you could trigger anyone of those conditions first then in the next cycle the one the previous rung. I'mnot saying that is 100% the case but having all those functions in the same row guarantees which one is executed first, you could also do it all on the first one and remove that auxiliar MB , I just dont like to add more functions after a coil or set/reset (on most ladder logic programs that is usually the end of the rung). However the auxiliar contact also guarantees the completion of the functions before allowing it to be triggered again. In my experience on ladder logic you should not assume that conditions will be triggered in the order of the rungs, It is like an electric circuit and everythingis happening at the same time, you need to use logic conditions to force the order if the order is relevant to the specific task you are trying to accomplish. That's how I do my logic.
  20. Its not like you can not do multiple functions in the same line its more like multiple "parallel" conditions in the same rung. this Is not a good practice: but It works. I think the issue is that the compiler may not execute the logic conditions in the same order as they are coded. technically those 3 has the same priority. and if your third "branch" depends on the status of an operand in the first branch it may not be updated since that is the same rung. but left to right there is no doubt on which one is executed first.
  21. I wouldn't say it is a bug but I've been there πŸ˜…. Once I had a timer that was ticking twice as fast because I had a sub running while the screen was being displayed and also in the ladder logic. I don't know for sure if this is the case, but I feel like there is a Non 0 chance that the scan cycle is evaluating rung 13 when the transition is detected (I hope you are not using Idle or anything else that could delay the execution of the next cycle). I'll do everything in the same row one followed by the other and I'll use auxiliary contacts. BTW, why are you using DW as timer preset? timer values can fit in ML. and you have more of those available, just a thought.
  22. kind of need to see your code but most likely you are doing something wrong, or missing some key concepts of ladder logic: look for "Program Sequencing: Modules, Subroutines, Labels & Jumps" in the help file. but here are some key concepts that may be where your issue is: ladder logic is sequential, but cyclical so the "position" of a transition contact to launch a screen shouldn't matter because if the transition contact occurs after the "load screen" function happens. it will be detected on the next cycle. Unless you had some entire logic that happens in-between (I.E. a Set, and its respective Reset happening immediately some rungs after the Set but before the thing that you want to trigger on transition). Sub routines needs to be on execution to change something (everything inside a sub routine won't change if it is not being executed, the operands maintain previous values). And I recommend trying to avoid executing sub routines inside HMI Links and Jumps. mainly because it is easy to forget that you had something in there but also because of the previous point (It is kind of buried and if you do a lot of export import you may miss something). so, If you are using this to transition between screens: better change it for this other methodology: And don't forget to place UI sub routine in your main function!
  23. Why I can't find this on visilogic help?.. πŸ€¦β€β™‚οΈThis is kind of a Big deal!!!! It is a feature that should be highlighted!!!!!!!!!!!!!!!!!!! 🀩
  24. at the end, using the PLC as slave exposes all the memory operands to the master, so even if you make any validation. The vulnerability is still there. I mean is like being on online mode and trying to force values, you kind of need to know what to change to affect the sequence but. what if someone could write a code to randomly write 0 to the coils, I bet you that eventually any program will fail no matter how robust the program is. Again, an attack like this will require physical access to the network.
Γ—
Γ—
  • Create New...