Jump to content

Fernando Castro

Members
  • Posts

    264
  • Joined

  • Last visited

  • Days Won

    24

Posts 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.

    • Upvote 1
  2. On 9/19/2023 at 9:35 AM, Milos said:

    Hello all,

     

    I have question related to connecting Vision 280 with Modbus TCP zenon SCADA driver. I have experience with other PLC-s but not with Unitronics.

    Please find attached config below:

    image.png.792632fadc344e817c8df16b01c9d0e6.png

    Below you can see zenon driver config and one variable config. I tried to see ML12 from program. Is this the way to directly call adress from SCADA or I missed some step?

    sigma is PLC name, PLC IP is in range of PLC.

    image.thumb.png.4a7baa6c62f0685e97c0aa6254be8df0.png

    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. On 9/12/2023 at 6:44 PM, Ausman said:

    I am very very disappointed about this PLC.

    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. 21 hours ago, Gabriel Franco said:

    If you have only one slave, I don´t see the reason to connect/disconnect the socket.

    Remember to set SB 168 at power-up.

    Consider to use UDP, then you don´t need to worry about connection.

     

    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.

     

  5. On 7/14/2023 at 7:54 AM, Adan said:

    Hi, Thankyou for your response. Can you please guide me or provide with a code that i could just operate 1 DO/Relay output for V130-33-RK6

    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 .

  6. 23 hours ago, Oldskuler said:

    Hi,

    thank you for your reply.

    1. It is 2 wire connection.

    2 No loose connections.

    3. In the meantime I found out that the colleague who did the wiring used a shielded cable, but he didn't connect the shield to the ground (didn't use it at all).

    4. Thank you for this, I didn't check it, but I will do it.

    5. Yes, cables are away from any voltages and VFDs.

    Also, double check your grounding on the PLC.

  7. 29 minutes ago, kratmel said:

    Adding to kratmel post,  you have 4 sockets available and as I understood you are only using 2.

    2 hours ago, kringh said:

    The tags updates fine when connected through 502 port, but when using the 20256 port the tags just shows error.

    Come on!!! , this is because for your SCADA you are using MODBUS TCP/IP and remote operator is the proprietary Unitronics protocol.

    2 hours ago, kringh said:

    . Do anybody know if it is possible to connect two Scada sytem at the same time to Unitronics V570?

    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. 10 hours ago, Sideway said:

    Hi everyone,

    I wonder if it there is any option or tool available to import/export communication addressing on Visilogic.

    I am currently using canopen and i would like to avoid entering the configuration of each and every node by hand (EMCY, NMT, PDOs bits and register addresses). I have 16 nodes to fill and i'd rather avoid any typing mistake.

    I think those addresses are hidden into Vision internal memory mapping but i wonder if there is any access to it other than entering each MB/MI by hand.

     

    Cheers,

    Sideway.

    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. On 6/23/2023 at 9:44 AM, garydreppert said:

    I have some actuators I am controlling with a vision 700 over modbus. When I read the holding registers for the position data the data is being brought in as signed 2s compliment numbers. Does anyone know why this is and how to bring it is as base 10? If i read the same registers with the program MODBUS POLL the data reads correctly with that program which leads me to believe it is something in how Visilogic converts the data. 

    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. 5 hours ago, Guest bhiatt said:

    I try to register my software. But I get a Proxy error. The IT person  has tried somethings but now it has reached its limit for the day so I need to get that reset. Any ideas on what my issue could be?

    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.

     

  11. 1 hour ago, Flex727 said:

    I guess I'm the odd man out. Once I carefully studied these graphs in the Help file and recognized that the Preset get downloaded with the project, I found Unitronics' Timers to be quite intuitive and easy to use.

    Fernando does have a point about Timers losing their Presets for unexplained reasons, but I have found that in electrically noisy environments, any PLC memory register can get scrambled and Timers seems to be first on the list to get zapped.

    image.png.5c6a3c99168fcfcdf993f9b9a28f1deb.png

    Gabriel's post came through while I was typing, but we seem to be in agreement. Also, while I rarely use the TA Timer, I do use the TE Timer very often. I'm sure it was intended just as it says, an Extended Pulse, but I also find it useful when I need to trigger a timer with a pulse instead of a direct contact. You just have to use a negative transition of the output bit instead of positive.

    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. 🙃

     

     

     

    • Upvote 1
  12. 17 hours ago, Yukiko said:

    Hello,

    I'm trying to send 15 registers of data via Modbus 485 but each register should have 16 bits unsigned, the MI are signed, Any suggestion without having to use a lot of MB?

    Regards

    MIs are not signed as @Joe Tauser said you could use it:

     

    image.thumb.png.cee51b117f579f429caf62e329d394c4.png

     

    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.

     

  13. 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?

     

    image.png.15775f5f224fe9a528870bc112e93371.png

     

    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:

    image.png.d23e0f50df2cf237fd254cad616e81b4.png

    and TE1 is not being used anywhere else in the project.

    image.png.1b7ddbcfa7a5c8a2930be9ba56684bc1.png

    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?

     

    Banging head on wall

     

  14. 23 hours ago, christopher said:

    is a lot of pixels to traverse with alt space M and arrow left/right/up/down...

    I feel your pain.

    23 hours ago, christopher said:

    I changed display 3 to 1 as main and hopefully it's not going to jump back and forth for each dock/undock from now on.

    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.

     

     

  15. 3 hours ago, AlexUT said:

    Hi,

    I posted link to other post, but eventually my post not published.

    --------------------------------------------------------------------------------

    This effect is not related to VisiLogic/U90Ladder, or other Unitronics software.

    It is related to Windows.

    I do not believe that anybody will wait for fix and call this "disaster".

    Simple work-around solve this problem.

    No need to edit INI files or access Registry.

    Yes, this is a little bit annoing, but may be fast corrected.

    1. Alt+Space+M than 1 time touch any arrow key, then move mouse until you find "hidden" pop-up.

    *Last letter M is language dependent.  So you have to find what letter to use.

    2. I found more universal way for my Windows 10 Pro:

    Use Win+Shift+Left/Right Arrow.

    This move "hidden" pop-up between monitors.

    If you connected additional monitor and set it to be Up of main display, then probably Up/Down arrow may work as well.

    Short and fast.

    B.R.

     

    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 ,

     

  16. 29 minutes ago, Flex727 said:

    I think you absolutely can assume that. The PLC executes each ladder rung fully before moving to the next rung. This is one of the basic principles of ladder logic and fundamentally why you shouldn't have multiple parallel logic threads in a single rung.

    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:

     

    image.png.9b905136e007872a6a8a39f3b34663eb.png

     

    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).

     

     

    • Upvote 1
  17. 2 hours ago, yyh2 said:

    Fernando, Thank you for you detailed answer.

    I'm referring to it as a "bug" because it loses the instruction/command.
    in your situation you called it twice, it’s a different thing (frustrating non the less).
    in my case, if I called the screen twice, no big deal, but the troublesome part is that it loses the neighboring net.
    if it's only the double call, it's not an urgent fix anyway, just knowing that here and on the help files is OK (i still suspect though that the "call screen from the L&J menu + multiple P contacts" even without double call, is a scenario the system dislikes). 

    Your ladder suggestion -
    your solution for a more predictable sequence is a good idea to keep in mind.
    in an absence of a solution I would definitely use it, but if we can learn how to avoid it, its better.
    First of all since I wrote the entire program this way 😁
    And second, because simpler logic with less set/reset coils as can be, is always my preferred way (a programming sixed sense that was reinforced by Joe Tauser's "Bit Banging" speech way back in the forum), if I can only work with the P contacts and trust them, it's the simplest solution.

    DW as a timer  -
    I have 4 program times and ML 1,2,3,4 were already used, so I assigned them DW 1,2,3,4 for clarity, no special cause, no other DW were used in the program.


    Multiple commands in a rung  -
    the argument against it was that it can compile not exactly the way you planned.
    there is a saying here that "Visilogic don’t charge you by the number of  rungs", so split long rungs into simpler ones.

    I do have some of them with 6 commands in a row, but they are "simpler" commands.
    parts of the idea for separating them was to diagnose whether "messy" compiling was the  reason for missing the net.
    It didn’t even occur to me to try parallel stuff.

    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.

  18. 19 minutes ago, yyh2 said:

    its mainly due to your comments on the forum's history, emphasizing the importance every time.

    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:

     

    image.png.250d63bdfc8415bb94356103ff737d2e.png

    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.

     

  19. 7 hours ago, yyh2 said:

    I think I figured at least some of it out.
    I was calling the jump from the ladder and the "links & jumps" tab in the same time, by the same operand.
    its seems that this tab takes precedence over the ladder execution (Bug ?).
    it fixed the current problem.

     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.

     

    7 hours ago, yyh2 said:

     

    exm3.png

    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.

     

    image.png.45efc1e64eec9e56035f1bcdf414c9e9.png

     

    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.

  20. 11 hours ago, yyh2 said:

    Hey,

    When I order a "screen jump" through the ladder, some commands/nets that are before the jump might not get executed.
    specifically P type contacts, right now its an HMI button being pressed.
    I'm working around it for some time now but it's starting to get really annoying.
    why is it happening?
    I mean... I get that the PLC is "Busy" loading the screen, but the command is not just delayed, which is ok for me.
    rather… its lost. it's not executing. The PLC is skipping it (i verified it a few times to make sure, the net simply isn’t "read").

    Any explanations and workarounds will be greatly appreciated.
    Yam

    (SM43-J-RA22)

    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: 

    image.thumb.png.7e0eb81157438b6a54052e3f4b0ea370.png

    better change it for this other methodology:

     

    image.thumb.png.850ba29cb12841a6904433d596058643.png

     

    And don't forget to place UI sub routine in your main function!

    • Like 1
  21. On 5/7/2023 at 11:57 PM, Joe Tauser said:

    I was wrong.  There is a way to limit Modbus access  to a block of data in MBs and MIs. 

    Ausman motivated me to find it.  I don't know when they were added, but they're not in 9.8.80.  I downloaded 9.8.96 and Modbus limits SI 165 .. 168 are in the descriptors.

     

    Joe T.

    Why I can't find this on visilogic help?..  🤦‍♂️This is kind of a Big deal!!!!  It is a feature that should be highlighted!!!!!!!!!!!!!!!!!!! 🤩

  22. On 5/3/2023 at 6:43 PM, Ausman said:

    I've been on the sidelines on this one, but it has occurred to me that perhaps one solution would be that the plc would simply store the first send's data and details into a designated buffer area, and ONLY act on that info if a second send that is the authorisation to do so arrives correctly within a restricted time frame. If the time elapses the buffer is cleared.

    If the request is genuine and been correctly set up, then the sending device will perform correctly and the result will be the plc acting as desired.  If the request is erroneous, nothing will change.   In some ways a little like 2 factor authentication.  It would add some time to the overall process, but in a lot of cases the few seconds involved would likely not matter.

    This process might be what others have been alluding to, or also use some of the same methods, but I don't think it is exactly the same.

    cheers,

    Aus

    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...