Jump to content

Flex727

MVP 2023
  • Posts

    3,330
  • Joined

  • Last visited

  • Days Won

    241

Posts posted by Flex727

  1. 13 hours ago, Ausman said:

    One of them actually started the address at something that technically wasn't allowed, so none of my normal PC modbus programs could access it in the first place. Ensure that the sensor's website doesn't have a "setting program" available for download. 

    I've often wondered about this. Is it incompetence, or some misguided sense of wanting to be proprietary?

    • Upvote 1
  2. 1 hour ago, ZK0 said:

    For example, if a coil for output 1 is present in rung 1 and rung 2, then the coil for O1 in rung 1 is simply ignored.

    This is basic to ladder logic and you need to recognize this in order to be proficient in this programming language. Understand that the coil is both activated (if off and power passes to the coil) AND deactivated (if on and power doesn't pass to the coil) by the logic in a ladder rung. If one rung turns it on and another turns it off, it can't exist in both states simultaneously. If two different logic conditions are needed activate a coil, then simply place them both in the same rung.

    By the way, you can run Project Optimizer from the Build menu in VisiLogic and it will tell you all instances of duplicate coils.

  3. 9 minutes ago, Fernando Castro said:

    Yes, you can. there is a workaround for that that I found using the string library:

     

    1. you store the strings on a data table
    2. load strings in the Data table to the desired MI using the data table read function.
    3. Set up String Library (String Storage 1 row 5 or whatever ) with variables pointing to the MIs where the string is stored.
    4. From the List of Text HMI element selects the string from String Library.
    5. That's all.

    Although depending on the application using String Storage instead of the Data table may be a better solution, I used the above because I set it up a list of descriptions and names that needs to be able to be updated, so it can not be a hard coded string.

    Nice!

  4. 4 hours ago, krolikbest said:

    I need to read string column from data table into something like list of text

    Normally, string data is stored in a vector of MIs, 2 characters per MI. You can easily read string data from a Data Table to an MI vector, but I don't think it's possible to directly transfer that data to a List of Texts HMI element. If there is some roundabout way to do this I'd love to know it.

  5. 4 hours ago, kratmel said:

    There is a bit of a problem here, because the output may not be activated, and the user simply pressed and released the alarm button and everything accidentally started. Therefore, using the state machine known on the local forum, I simply turn off the required outputs with an alarm bit and when the danger has passed - everything returns to the state as before the alarm. That is, an unactivated bit is not accidentally activated

    kratmel is absolutely correct. As I mentioned, we really need to see your project to understand what you're trying to do. The simplest method that solves kratmel's concern is the following:

    image.png.0afe0355cd59f0bc78706be57e60e0e6.png

  6. 11 hours ago, Fernando Castro said:

    Info mode could do the trick  just create a backup before download and restore after download, but guess what?... Is not supported with remote operator!!!!!

    You can easily create any kind of backup to SD in ladder, including Operand. Just add that and you can initiate the backup from Remote Operator.

  7. 6 hours ago, Fernando Castro said:

    after a new download if the main code is way too different from the original it seems that some operands are overridden with random values.

    You seem to be demonstrating this well, but I'm amazed - I've never had this happen with the hundreds (thousands?) of downloads I've performed, both in the field and on my test bench. This is potentially a big problem that perhaps should be addressed by Unitronics Support.

  8. 2 minutes ago, Fernando Castro said:

    the main problem is that after a new download if the main code is way too different from the original it seems that some operands are overridden with random values

    Or does the new program have the operands moved about? The retained memory will not know if the operand is at a different address with the new program.

  9. My guess is that Vic's V570 is set up to communicate via MODBUS over UDP and he doesn't want to (or can't) modify the V570 program to change the socket protocol. Therefore he needs the UniStream PLC to communicate with the V570 using UDP.

  10. 15 minutes ago, kratmel said:

    Having a training class with Vision PLCs, I have another problem - each subsequent student downloads his program and receives a gift in the form of operands from the previous user. Then he tries for a long time to understand why the program does not work.

    Make it a practice to have them download a blank project and perform Initialize & Reset when starting up with a new PLC. This will also prevent what happens to me occasionally on my test bench where I do my program development. These PLCs will get hundreds of downloads for each project and eventually something in memory gets corrupted. A blank program download fixes that.

    • Thanks 1
  11. 2 hours ago, Fernando Castro said:

    NO NO, set reset must also be one of each if you want to be able to debug easily and go to bed early in the future.

    This is totally true, but my reference was to functionality. You absolutely cannot have duplicate direct coils and have them function properly, but you can have as many SET & RESETs as you would like and the program will function as intended.

    Personally, I do try and have single instances of any coil, but I occasionally will have multiple instances of SET & RESET when the logic calls for them to be in different subroutines. This is precisely for the reason you cite - to make it easier to debug and for future understanding of the logic.

  12. On 8/29/2022 at 5:42 PM, Raul95 said:

    In unilogic software I can not see any of them tools, could you please tell me which tool I should be using instead ?

    Actually, you can linearize right in the analog I/O setup. No need for the Linearization function block. The analog output will be 0-10V, so just enter 0 for 0V and 2x the speed for 5V for the 10V entry.

  13. 14 hours ago, Raul95 said:

    Is it possible to simulate the program without connecting it physically to the plc ?

    No it's not. However, you'll find that purchasing a PLC to use for this purpose likely will be cheaper than the software simulator that you might buy from other PLC manufacturers. You do NOT need to purchase any I/O, as the PLC is designed to run in simulator mode without any I/O attached.

  14. 15 hours ago, PeterPan217 said:

    So I can't have the coils reset by logic in the program AND have the option to reset by a push button?

    Sure you can. Just make sure there aren't any duplicate coils. Place all the logic for a single coil in a single rung, including the ladder logic to activate the coil and the contact for the button. If you need to use SET and RESET instead of Direct Coils, you can have as many of those as you need.

  15. 1 hour ago, PeterPan217 said:

    However, now I'm struggling to get accumulating timers to reset with an HMI button.

    You have many duplicate coils in your program. That is a big no-no. With regular coils it results in "last one wins". With timer coils, it causes them to run at double speed (or not at all). Run "Project Optimizer" under the Build menu to help find them all. My best advice is to stop using conditional subroutines and write your logic so it's not needed - and NEVER have duplicate coils under any circumstance (duplicate SET & RESET coils are perfectly fine).

    You still have multiple logic threads in a single ladder rung (Main Routine rung 1).

    With Unitronics there is no need to place coils all the way to the right side of the ladder. Nothing wrong with it if that's what you want to do, but it makes the ladder difficult to read on a small screen.

     

  16. 48 minutes ago, PeterPan217 said:

    I've been online and everything does it's red highlighting

    Keep in mind that the online indication is not necessarily doing what you might think. All VisiLogic is doing is querying the PLC for the state of each operand and indicating that on screen. It does not do any logic. Therefore, if a subroutine is not being called, it will still look like it is because the operands exist in the PLC and have a state that is displayed.

    You are welcome to post your program here and we'll try to help.

×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.