Jump to content

Fernando Castro

Members
  • Posts

    264
  • Joined

  • Last visited

  • Days Won

    24

Everything posted by Fernando Castro

  1. And this is the evidence to prove my point using other different than visilogic, it can be compiled, downloaded and executed rung 4 does not matter at all, it just does rung 5
  2. As far as I remember on the other PLCs that I have used before that's how it works, the code will only respect one Coil. also, why someone will do that on purpose?. I guess you could technically do it on subroutines as long each sub has the logic conditions that doesn't allow both to be active at the same time.... but again, why?
  3. Yes, you can. there is a workaround for that that I found using the string library: you store the strings on a data table load strings in the Data table to the desired MI using the data table read function. Set up String Library (String Storage 1 row 5 or whatever ) with variables pointing to the MIs where the string is stored. From the List of Text HMI element selects the string from String Library. 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.
  4. No puedes. Si al descargar originalmente no se seleccinó "Burn Upload Project". no hay manera de cargarlo al PC después
  5. Oh, definitively it helps but by hardware, I mean other "devices" that interact with the PLC, as an example I have some sensors with different units and full-scale ranges even that are used for the same process variable, which means if sensor A is installed then I apply this LINEAR function, if B is installed then is this other LINEAR function. so if sensor A is installed a sensor B is selected on the screen then we have the wrong reading. It is what it is... a very bad design. It went from concept to scaled production without fully standardizing. Cables are built in-house which means 1 DB connector has 2 different I/O sets embedded in it. sensor A uses one set of pins, and sensor B uses another, so then the wires of the cable are crossed over and if you connect it on the wrong side you may fry something. Part of my upgrade process is trying to use standardized and little by little replacing A/D signals with industrial protocols. but of course, everything times 180 becomes expensive, so I won't be having fully standardized Hardware any time soon. there are layers and layers of complexity that weren't necessary if we had stick to one single design😩.... But I get paid to handle all of this, so its a win for me I guess.
  6. part of the problem is upgrading software from plcs with a previous version of software, I can only modify future versions but I wanted to preserve some previous values (whitout messing up anything). I have a lot of systems that are essentially the same but designed to work with different combinations of hardware(which is a pain in the ass because of the many combinations possible, and specific values). for newer versions of course I will load presets by software on power-on... My complain is that Unitronics has a check box that alledgly does that, and there is a scenario on wich that won't work 😡 . I already had compiled and started to deploy the software by the time I discovered this...Now, it is just easier to double-check each parameter comparing to a picture, rater to take their risk of some preset being cleared if I try to use the backup method. I have a tight timeline to deliver new versions of software and eventually I will have another chance to try some fancy way to automatically preserve settings for the next release, but to be honest I don't want other "surprises", and there are more important features to keep working on. I prefer to lose some parameters that can be added again from the HMI, rather than some weird thing in the background. And now I finally understand why downloading a blank project fixes weird issues.
  7. I repeated this a couple of times to corroborate and I think this is an issue that could lead to many many problems when backing up/ restoring operands. If you load either operand from the SD or import operand values using Visilogic, all preset values on counters/timers will be overwritten, and even having a power-up preset value won't restore them. The only ways to restore those values are: manually changing the preset values using info mode or Visilogic. PLC Init using info mode or Visilogic. PLC reset does not reinstall preset values if restore operands function was used before . Bottom line of this: Do not trust on power-up values for timers and counters, always use SB2, and store Preset function block to load hard coded values Regarding the best practice for download and keep specific parameters... I gave up. The best way is to take pictures BEFORE the download and manually enter the values AFTER the download.
  8. Me again, still trying to figure out a fail proof way to downloads. so, I used the backup operands from "info mode" while I was on site, my thought was that I could have a backup and then restore from the new version that has that button enabled by me. the only problem is that the filename generated using "info mode" has a timestamp as the name, and I hardcoded to look for "BACKUP" as the filename I tough that worst-case I can rename the file with the SD card browser. To my surprise, the SD card browser does not allow uploading. D57 or .D70 files to USER_APP which is a boomer. the other thing that I noticed is that I got a counter being stuck: to my understanding as it was configured C6 should have 60 as a preset value and restart the coil C6 (R) on power-up, is this correct? The issue that I face is that that counter was still being on even having the conditions to RESET the coil all true, on troubleshooting online I noticed that preset was 0, so technically the counter was already at the preset value making C6 coil to be SET. Maybe that was because I loaded the Backup operands after the upgrade and the previous program had a C6 Preset value of 0?, I tried: info mode -> working mode ->then reset and C6 was still 0 then I changed the preset value to 60 using the online mode that was fixed.
  9. I'll just leave this over here... PLC: Just 2 function blocks required on the PLC Socket Init and UDP_RAW scan (In theory should be the same over TCP, UDP was easier to implement required fewer things) PC: I'm using Node-Red and just send a "payload" containing the string "Hello world" using the UDP node : udp out This node sends msg.payload to the designated UDP host and port. Supports multicast. And that was it. It took me 5 minutes no ASCII string conversion no data splitting, no byte re arrangement. just send a pure string as it was written. Of course LeonMötter It will be easy as easy it is from your the other end to get that string to an specific port and socket
  10. I think it will be easier over TCP or UDP, you could send the ascii characters as string and the PLC will be able to read it as it is, I kind of did that while trying to implwment a FTP client on a v570, i could retrive the folder and file names. However Modbus its ok, but it deppends on how easy it will be for you to work on the database/computer side, you maye need to rearrange the bytes because of the endianess and also you need to set the specific modbus addreses. I did the other way arround ASCII string stored on the PLC to database over modbus TCP, and was tricy because my client (PC) had a slightly different implementation for de modbus protocol, and I did not had a way to combine the different MIs to a single string, best i could do was hex values, and at the end I needed to learn new programming languages and how to re compile the Database software (which is open source) just to add one custom function to convert everything into a human readable string. over TCP its just sending the message to an specific port and socket, the PLC has a function block for reading the protocol as ASCII
  11. If anyone is interested in following up, the day has finally arrived. I have been asked to implement a way to manage filenames with more than 8 characters. I have already figured out how to do it, but I still need to actually do it. Heads up It also solves the problem of not being able to use the SD card file explorer ladder function through the remote operator.
  12. Yes, I already did that I mean, the idea it was to trigger the restoring after the download automatically after it finish but SB75 does not get triggered using Unictronics Download Manager. to download the file I also have it being able to do it from buttons on the HMI: The caveat is that even having those buttons the backup option can only be available on the new software version not on the previous ones.
  13. I do agree with you, It is not a problem that happens every time. I have been using this method (Unitronics download manager) for almost a year now because I tough it to be unsusceptible to "dumping" operand values retained from the visilogic project on tho the PLC. I only noticed this issue recently because some specific MIs contained values critical for operation. But now I am thinking about it, each time PLC restarted whit out the correct IP settings/name, or some feature enabled/disabled, or other minor things that usually were "flushed" out once started the system could be because this. 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!!!!!
  14. That is the main reason why I made Unitronics Download Manager our standard way to deploy new versions. we had problems at the beginning and since I spotted that was because the download was made through a different version of Visilogic, now I compile Application + OS + all the checked boxes, of course, We only choose to update the OS if it's different from the "Standard". This tool is AMAZING never seen something like that with other brands, being able to deploy many downloads different versions and different PLCs at the same time is a HUGE time saver. I manage software releases using a one-drive shared folder so, if I am not available anyone could log in on the remote computer that has all those UDC files sync to one-drive and it even works great over network and VPN!!, but I do prefer to remote connect to a desktop PC that is wired to the same network on site so I can start the download and If I lose connection no harm no foul Unidownloader is a different tool, I guess the intention is to compare the difference between those two You can add many "channels" to each "compiled" file. The added benefit is that the generated file can not be edited, so it no longer "Ups I made download, then a minor change saved and now my project is different from the previously downloaded one. once compiled there is no way to make an unintended change.
  15. I was able to replicate the issue of random memory values that I am trying to solve: I backed up all operands from a production flor PLC and took note of the software version I Installed the same software version on the test PLC I restored operands to test PLC using the file that I got from step 1 Upgraded software using Unictronics Download Manager: At glance, I was able to identify some MIs filled with random values: MI25, MI26, MI28, MI29, MI30, MI31, MI32, MI33, MI34, and MI35. Just looking for MI35 as an example we can see that is used the same on New(Left) and Old (Right) versions Note: HMI names were changed just for the sake of better understanding and order in.Sensors2.0 replaced in.Sensors which is no longer used in the code, no functional changes were made for the usage of MI35.
  16. Yes, that IS a problem or more like It WAS when I took the project from a previous programmer and new one uses a different philosophy , because of that I just started to use unused operands and every operand that I add, I look for to double check that was in fact not used anywhere else in the code. That methodology worked great for almost a year or so I could even roll back between version preserving everything else but just to be safe I always backed up operands and restore on downloads . Through continue feature requests and new additions to software the current version is just different from the OG, but similar to previous ones . As an example on my v11 to v12 on V700 PLC ML0 is being overridden from 256000 to 268369920 after a download. ML0 has been using for the same since the beginning!! that ML happens to be the very first one so it is also not possible to be filled by accident by any vector.
  17. All of them, and is not because I want it, 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. it is like the retained memory is not being retained anymore (After a new download, this problem does not exist on power-ups or if the new download is similar to the previous one). I also had same impression reading the documentation, but what will be the point of having an SB that you could not read because it will be off before the application even runs ?? However I just decided to do the test and It does work I mean the full code is a little more complex than just that line: I set an MB, and wait until the SD card is detected and the backup file exists, then I automatically restore all backed up operands, and after that, I check the software version recorded if the one after the backup is different then the new software version is stored on some DW as ASCII. But All of that works when downloading through Visilogic SB2 by itself won't work because it needs to be done just after a new upgrade, not every time the systems power-ups, the workaround could be that just after the backup was created set another MB and have it in series with the SB2, so on the next restart after the download it will be executed and when completed reset that MB (assuming that MB won't be changed after the download). I will try that and see
  18. Ok, every time I'm close something else happens..... seems that SB75 does not get triggered when using Unictronics download manager 🤦‍♂️ for downloads. I implemented and tested the solution downloading with visilogic, then prepared the VDF and UDC files and it does not work 😩 I just left this line enabled from the entire "backup" logic to debug where the problem was:
  19. My goal is to be able to upgrade many devices at once remotely minimizing the human error so Visilogic will involve many steps.. times many PLCs I bet you that some files will be overridden eventually, backing up operands to SD plus using SB75 as a condition to restore operands from SD could do the trick however the backup part still needs to be done manually, I have been searching for any other SI, SB, or SDW that could indicate if a remote connection to Unictronics download manager or any of the unironic suites software was established and no luck so far. If I could trigger the backup automatically just before the download that will be awesome. At this point I´m just being picky, Login in with the Remote operator then pressing a button buried in some of the settings screens, and then using the Unictronics download manager to do the download seems good enough anyway the software upgrade process must confirm that the system is not on operation before starting the download. Bottom line is I am lazzy and I want to go to bed early 🤣 I want it to be fail safe and delegate the upgrade process to anyone if I need.
  20. Ok, I forgive you... I do like to use subroutines a lot but it always gets tricky if you want to use conditional executions, my most recent approach when using conditional logic on subroutines is to define a struct and "clear all" values when leaving the subroutine not active. It's a way to use subroutines as "custom functions" that I can import and export to my other projects. It's an over-engineered solution but is very useful for making a modular project , the only caveat is that I must define and reserve all memory addresses that will be used in each subroutine.
  21. I agree blank PLC initialize clears everything and It's safer to start with a "white canvas", however, It would be nice to be able to preserve previous retained memory values without doing all the hassle.
  22. Yeah, learned that the hard way... nowadays I double-check that every new address was not used before when I add a new one. It is tedious but is the only way.
  23. As everyone that uses the Unitroncis vision series already should know by now, making a new download to upgrade a program could potentially change some values on the PLC. the most reliable way to manage the upgrade process of my PLCs was. Connect to the PLC login Export operands to Binary file Download the new project Import operands from Binary file Add required new values for setup in the machine if that is the case eventually, I added default settings on a data table for any new value required at least "base values" that are only executed if you hit the default button or on the very first boot (I use a previously unused MB and set it to be 1 after the first run).: And this is pretty much the content of Default. Settings: So far so good, plus the fact that Unitronics retains memory values after each reset is a good solution. The downside is that when you deal with a lot of PLCs it's tedious to do it. but eventually, I discovered Unictronics download manager: Suddenly I could manage more than one download a t the time which it is a very big deal when you need to do more than one PLC at the time, Does anyone knows what the Download data tables (RAM) do? it is not on the documentation.: anyway, I tested it and it seemed to make a clean download keeping all retained values and not adding weird stuff, or at least that was the case for like 10 revisions of software that I have deployed in the past year so far. However recently on the debut of revision no. 12, I noticed that some V700 was clearing one critical value that was used in the software that was weird because I couldn't replicate that behavior on my test bench, I tried to downgrade then upgrade and still nothing, but each time I deployed the same version with the same method on a production machine the same issue keeps happening. ML0 was set to be 268369920. instead of retaining previous value. Not a big deal I tough, double checking one value on one screen after each download was a compromise that I was willing to do with all the saved effort but now on revision no.13 many values were overridden which essentially made the machine inoperable even MIs in the background which didn't have any manual Input were changed. Not a big deal I mean I can pretty much solve major issues by adding those to the default values and having to manually input the ones that will be specific. seems that I can not trust the retained memory values for each software rollout. I hypothesize that defragmentation on Hard Disk physically resigns clusters to store parts of the files. on any new download, the compiler re-arranges some of the FPGA or whatever may be inside the PLC so after the download some of the memory values now hold different values than the ones that were used before. This makes sense to me because earlier revisions were very similar just minor incremental upgrades adding new features, and on this 13th revision, I restructured completely an entire part of the logic. (Pretty much deleted a lot of SET/RESETS scattered all across the entire program and created a unique sub-routine with all the logic related to the outputs linked to those SET/RESETS). so the chances of random memory values appearing to depend on how different is the new program compared to the previous one? Does anyone have a better way to back up and download new versions? Maybe using the SD card clone function will be bulletproof and easy to automate. Maybe I am asking for too much but having 180+ PLCs to maintain, and having many combinations of hardware with specific settings and production schedules make this critical and tedious
  24. I know.... I wouldn't say that Unitronics is the best at maintaining proper documentation. But to be fare that happens a lot with other brands too, "application notes", "expert knowledge" or however everyone chooses to name that hidden section with useful information 😂😂
  25. That's correct, the proper way to work is if everything runs on parallel at the same time, however, the truth is that plc has scan cycles, which makes it easy to do some trickery between cycles and I've seen that a lot in Unitronics examples. However, having said that even on AB you should not use more than one coil at the same time. I am pretty sure that if you do it, it only obeys one of the many instances that exists in the code I know because I did that too on my early days on a micrologix and banged my head against the wall a lot while asking why my logic didn't work as I intended.
×
×
  • Create New...