Jump to content

Flex727

MVP 2023
  • Posts

    3,271
  • Joined

  • Last visited

  • Days Won

    238

Posts posted by Flex727

  1. 6 hours ago, pascal said:

    the things I learned, thanks to this forum, is to keep the rungs as short and clean as possible

    Yes, you've learned that from me and a few other senior members of this forum. The issue is that when the rung is overly complex, the compiler may not execute the steps in the order you might think. In this case, it doesn't matter which order the two increment functions are executed therefore it doesn't matter whether the rung is set up as serial or parallel.

  2. 1 hour ago, kratmel said:

    Something like this is appear if  i try open  vlp project created in this 9.8.65 version on my PC.

    Yes, .152 corresponds to 9.8.65. Any 9.8.65 project opened in a later VisiLogic version will have the .152 project created which is just a backup of the original project in case you subsequently save it in the later version without a name change.

    1 hour ago, kratmel said:

    But if i try to delete 152 file, it is not appear after second open in Visilogic 9.8.65.

    I just tried that and a new .152 file was created. Not sure why that doesn't happen in yours. I was using VisiLogic 9.8.80 to open the 9.8.65 file.

  3. 12 minutes ago, kratmel said:

    Yes, there was something similar, and it was in one of the versions above 9.8.65. I made a rule out of fear of losing what I had worked on - to start every day with a version of the program one unit higher than yesterday. That is, 001, 002, and so on. I always have a previous version with the ability to repeat the changes that are documented on paper for the latest version.

    Yes, I do this too. However, this particular update was completed in a single day so there was no incremental backup available.

    14 minutes ago, kratmel said:

    As for restoration, it is worth trying to find a backup of the project that is saved automatically during operation (it has the same name and the version of the database as an extension at the end). It is worth trying to rename it to vlp and open it with VisiLogic.

    This is created when opening the project in a higher version of VisiLogic. Unfortunately, I never tried to open the file with another version, so there is no backup available.

    I only lost a few hours work, not the whole project, but this is still very disturbing to me. I had emailed the faulty file to my customer and fortunately he requested an additional update today before trying to load the file onto a working system. When I started working on the additional update was when I discovered the problem. I checked the file that I sent him via email and the problem existed there and not just on my local hard drive. I also checked the file on a different computer with the same result.

  4. 34 minutes ago, pascal said:

    another thing to mention -> you are not using correct ladder....

    block 55 -> you should place the increment functions one after the other....

    if [counter] ------ inc [counter 1]-------inc [counter2]

    Why do you say this? It is functionally equivalent to place these increments in either series or parallel.

  5. On 9/26/2022 at 1:40 PM, 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.

    @Fernando Castro, thank you for this. I suddenly had a pressing need for this strategy on my current project and it worked perfectly.

  6. I like your method, kratmel! Here's what I ended up doing:

    image.png.ead2ac9112e3fe1bed24c43c3e4c51fd.png

    The original bit was an "enabled" bit that I needed to use to hide an HMI element, so it needed to be flipped. Normally that's not a problem, but when you have 25 of them it's a pain. I have begged Unitronics for a checkbox on the HMI element hide setting to allow either on or off to hide the element, but I'm sure we'll never see it.

  7. No, I need to TOGGLE each bit in the vector. Some of the bits are on and some are off. I need to flip each bit. It doesn't have to be immediate, just in a single scan. I can brute force it by copying each bit to another vector with an inverted contact and coil (x25), requiring 4 rungs, perhaps fewer, but I was just looking for a clever way to do it without all that typing.

    Or maybe I'm misunderstanding what you're suggesting.

    I'm thinking I can convert the vector to an integer, multiply by -1, then subtract 1, then convert back to a bit vector. I'll see if that works.

  8. crash888's problem was that he wanted the value of the operand (COUNTER2) to be retained when the PLC is rebooted (retain checkbox was checked). He found that instead it was being reset to zero. Gabriel Franco correctly noted that crash888 also had a value entered in the box for Initial Value, so while the value was retained, it was immediately being overwritten on the first scan by the value (0) in the Initial Value box.

    Unitronics needs to automatically uncheck the retained value checkbox and grayout the feature when something is entered into the Initial Value box, or grayout the Initial Value box when the retain is checked, since they are contradictory.

  9. 1 hour ago, ORSO2001 said:

    theoretically the "initial value" is checked just for the really first time that the program run...others reboot the retain has to save the last value that it took before the power off....

    It would be nice if UniLogic (and VisiLogic) had the option to assign a value to integer operands on download similar to what is done with timer presets. Nevertheless, Gabriel Franco is absolutely correct in solving crash888's problem.

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

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

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

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

×
×
  • Create New...