Jump to content

Rivka

Moderators
  • Posts

    62
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Rivka

  1. Hello, Do you mean an array of structs? Can you post the exact syntax you are using and the error given by UniLogic compiler? Thanks
  2. Hi @zed, In a normal workflow, you'll probably not need to use them. The "rebuild all" function is made to clean UniLogic compilation cache. You'd use it if you have a suspicion that some code that you wrote does not affect your PLC or some similar wrong behaviors that you can observe. (understand now why it is not in help? 😄 But more seriously, any serious IDE always offers that option. It can be called "clean build" or splitted in 2 actions: "clean", then "build") The "reallocate memory" will help in cases that memory is fragmented and will give you more space for your tags. Again, you'll probably never use it Hope this helped Rivka
  3. Hello, The corrected code you posted above is indeed correct : you don't assign a value to the pointer itself anymore, but to the value pointed by the pointer. That's what was intended and both compiler agree that it is ok. If you want to continue using C functions, you probably need to get acquainted with C pointers (and with C subtilities in general), but if your needs are close to the simple sum loop you just did, consider using the loop ladder element (have a look on the help, it is very simple and no need for C code) Hope it helped Rivka
  4. Hello@Marco Antonio Mendoza Happy to hear that you solved your issue! Here, UniLogic probably saved you some time as the code you wrote before did not operate the intended operation. It saved a value into the pointer itself and not to the value pointed out by the pointer. The fact that it worked in another compiler was probably due to a different setting of warnings and errors and the other compiler permitted an assignement of type int* = int, which usually points out an error in the code. You might have a look on https://www.programiz.com/c-programming/c-pointers to understand better how pointers work. You can also use our new ladder element called "for loop" (search UL help) that would have solved your issue without writing a line of C code. Hope that helped Rivka
  5. Hi @jj168, Please contact support. There is no one "magic" way to solve that issue. CPU error can come from a lot of reasons. Hope you'll get the solution very soon.
  6. Hello, Can you please specify from which functionality within UniLogic you are exporting data into csv file?
  7. Hi @thelmus, Error code -318 means that for some reason, voltage is not applied to the drive. Is that your case? @Cara Bereck Levy this code had been added to the list later on, could you please add it to the list of error codes? Hope this helps Rivka
  8. Hi @Bruno Zbinden There is no such a functionality as of now, but as a workaround, you can use the "analyse project" tool Then, it will show you statistics on the project. You have a way to export it as an excel and then to compare excel issued from the 2 projects to compare. Regarding ladder logic, you can print ladder functions and look at them side by side. I know these ways are not ideal but it can help achieve some kind of comparison anyways. Hope this helps!
  9. @Saragani, do you know if the 256 bytes limitation is only on local variables or include in/out variables as well? If it is only on local variables, Kpotmake can get along by creating ladder function that declares all local variables and passes them as Function inputs to the C function. Do I make sense?
  10. Hello, Well... calling ladder functions from C functions is possible, as you can see below, but although calling C functions from within C functions is also possible, it is not sure it'll help you regarding local variables limitation as I can see in Help the following line
  11. Hi @Martin1, I hope I understood what you are trying to achieve, please tell me if I am mistaken. I've never tried that, so first try it on an empty project: 1) Create an array and use the "export tags" feature 2) in the created excel, edit aliases names to give a unique name to each array member 3) Use in the target project the "import tags" feature.
  12. Hi @Martin1, You can probably use the "Copy tag to buffer" to transform your UINT array into buffer, then "buffer to tag" ladder element to transform your buffer into INT array. That should make the trick. Obviously, if you have in your UINT array numbers that are greater than max int32, you'll get a negative number. Have a good day, Rivka
  13. Hello @Kpotmake, There is no built-in way to achieve your goal... but there are workarounds. For rearranging Function in / out, I would 1) add to function In / out parameters the tags you want to appear in the right order, with other names that resemble original ones 2) use the find and replace feature with scope set as current function, 3) delete Function in / out tags that were not in right order 4) Rename added tags to the original names. You can do the same for rearranging global tags although it is probably much more work... For arranging tags in struct, it is a real headache... Since there is no Find and replace feature on the struct member itself, but only on members of the struct instances... Unless you have some structs that have only one instance or very few, then it is doable relatively simply. I understand those solutions are not ideal, but for a one time operation it can make sense to work hard (think well of the order you really want before doing so, you'd not be happy doing that all over again after a good night of sleep!) Hope that helps you
  14. You're right, we can qualify both codes as "configuration mismatch". But one is because the IO number is wrong and the other because IO types don't match.
  15. Hi, Here are the statuses. @Cara Bereck Levy, I could not find those statuses in help, but I might be mistaken. 0 = OK 1 = Not connected 2 = inconsistent number of connected IOs 3 = configuration mismatch (wrong IO types detected 4 = network error
  16. Hello, You are right, the feature is not implemented yet, but you can use the "analyse project" tool then "export to excel" on both projects. It will give you some informations on the projects differences athough you cannot compare the Ladder logic. Hope this helps Best Regards Rivka
  17. Hello @hamfam, The member "control value" is actually supposed to be read-only. When reopenning your project, and compiling with "Rebuil All", does the assignment still pass compilation? Did you create P1 and P2 at about the same time? I guess any "PID config" struct that you create from now and then gives a compilation error on such an assignment, right? I suggest you to send your project to R&D (through support), it looks that the P1 tag is somehow corrupted. (you don't really have to, if you wish, you can just create a P3 variable, use the find & replace feature to replace all P1 occurrences with P3, delete P1, then rename P3 to P1) Hope that helped you Best regards, Rivka
  18. I understand. I will pass the suggestion to R&D and they will decide whether to implement it or not. Have a good day! Rivka
  19. Hi, You have a search option available. And starting from next UniLogic version, you will be able to remember previous searches so you can navigate between different searches. Is that answering your needs?
  20. Hi, I approve what DanT advised: use the regular "store" option of the switch case in order to store a fault code into a tag, then link tat tag to a HMI "list of texts" element in order to link each value to the text you want to be displayed. Rivka
  21. No, as of now, motion is controlled through Ladder PLCOpen compliant function blocks only.
  22. Well, I confirm it does not work with UniLogic and it is probably not going to happen. One thing you can do is: under tools, you choose "analyse project", then "export to excel" and you'll have a good overview of the 2 projects. Ausman suggestion about print to PDF might be more relevant as what we mostly need is usually to look at ladder logic. Note: if you use a subversion software to manage your project versions, and you pay attention to commit each version with detailled comments, you'll also have a good overview of the project history Have a good day! Rivka
  23. Hi, try at C:\ProgramData\Unitronics\UniLogic\Data\UniPics
  24. Hi, Please take a look at UniLogic help. Attached a print screen of relevant section. Hope this helps
  25. Hello, Your request had been implemented, it will be available for next UniLogic version
×
×
  • Create New...