Fernando Castro Posted September 3, 2022 Report Posted September 3, 2022 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
MVP 2023 kratmel Posted September 3, 2022 MVP 2023 Report Posted September 3, 2022 Unfortunately, I have not come across such a large number of PLCs that need to be updated. However, the main problem of updating is the control of changes in versions. I am a follower of the old school of programming where most of the work was done on paper. That's why I go straight to improving versions and always write down all the operands used. I introduced a system of their numbering and belonging to PLC functions. Accordingly, the project notebook with operands has sections where I can quickly see what and where I wrote. If the changes to the project are drastic, my update process involves loading a clean project, initializing and resetting. Then upload a new project. At the same time, I save operands after debugging in text format. Maybe it's longer, but I can easily make a comparison using my notes and a text file of operands. P.S. 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.
MVP 2023 Flex727 Posted September 3, 2022 MVP 2023 Report Posted September 3, 2022 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. 1
MVP 2023 Ausman Posted September 3, 2022 MVP 2023 Report Posted September 3, 2022 Fernando, at present I can't answer your DT RAM question. But a thought you might want to check.... Leftover operands might be upsetting the process. Have you very carefully gone through your entire project and deleted unused operands? Use View/Operands not referenced in Project. I always use the unused operands list very carefully, cross checking everything, as I have sometimes had it referencing things I know are in use. But mostly this relates to vectors. However, it is very good at picking up those small changes you tried years ago that you didn't ultimately use, but an MB or MI here and there done at the time that you've forgotten to delete still exists. If they are still around, they may affect things the way you're thinking re clusters etc. Even just one element hanging around might upset a host of other "real" ones. cheers, Aus
Fernando Castro Posted September 4, 2022 Author Report Posted September 4, 2022 16 hours ago, Ausman said: Have you very carefully gone through your entire project and deleted unused operands? 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.
Fernando Castro Posted September 4, 2022 Author Report Posted September 4, 2022 17 hours ago, Flex727 said: 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. 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.
MVP 2023 Flex727 Posted September 4, 2022 MVP 2023 Report Posted September 4, 2022 2 hours ago, Fernando Castro said: however, It would be nice to be able to preserve previous retained memory values without doing all the hassle. You can quickly and easily store operands to the SD card or download them through VisLogic.
Fernando Castro Posted September 6, 2022 Author Report Posted September 6, 2022 On 9/4/2022 at 1:31 PM, Flex727 said: You can quickly and easily store operands to the SD card or download them through VisLogic. 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.
Fernando Castro Posted September 6, 2022 Author Report Posted September 6, 2022 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:
MVP 2023 Ausman Posted September 7, 2022 MVP 2023 Report Posted September 7, 2022 I don't use Download manager so don't know it's quirks. However, I am wondering how many operands you are wanting to store and retrieve each time? And why not use SB2 to trigger your reload? I think you're interpreting SB75's action incorrectly. My interpretation is it turns on for a single scan and THEN you can run your application, so your ladder test won't work. But SB2 should do what you want, along with an inbuilt startup delay to allow all operands to come in. That's why the question on numbers..... cheers, Aus
Fernando Castro Posted September 7, 2022 Author Report Posted September 7, 2022 2 hours ago, Ausman said: However, I am wondering how many operands you are wanting to store and retrieve each time? 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). 2 hours ago, Ausman said: I think you're interpreting SB75's action incorrectly. My interpretation is it turns on for a single scan and THEN you can run your application, so your ladder test won't work. But SB2 should do what you want, along with an inbuilt startup delay to allow all operands to come in. That's why the question on numbers..... 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
MVP 2023 Flex727 Posted September 7, 2022 MVP 2023 Report Posted September 7, 2022 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.
Fernando Castro Posted September 7, 2022 Author Report Posted September 7, 2022 Just now, Flex727 said: 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. 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.
Fernando Castro Posted September 7, 2022 Author Report Posted September 7, 2022 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.
MVP 2023 Flex727 Posted September 7, 2022 MVP 2023 Report Posted September 7, 2022 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.
MVP 2023 Ausman Posted September 7, 2022 MVP 2023 Report Posted September 7, 2022 With regards to the SB75 puzzle, I also thought it an odd thing on my first read about it in your post. I mean...it implies that the system is doing scans and the bit turns on for one scan once the download is finished. Huh? It's running scans during the download? I'm wondering whether it might be a mixup of comms direction, part of the back to front naming re down/upload to the plc. It might be referring to upload? @Saragani could you please explain this completely, how it works etc? And also look into the entire issue presented in this topic? Re the random numbers, it still implies the way the numbers are innately stored in the plc moving around a little. Please confirm that every plc is using the same OS, same version of Visilogic, same everything before you start the process. I have now installed DM to look at it better and I note that it has the ability to download everything to the plc, embedded into the file. Are you using this, or just doing the application? I also wonder if different versions of Download Manager only match perfectly with specific versions of Visilogic? Finally...during getting the program I also noted something that is perhaps important. As I have said, I have never used it before. My highlighted bit implies only a single PLC for Unidownloader, so maybe this is the issue. But how do you make the UDC in the first place for multiple same units? I think what is needed is a comprehensive method description by someone who completely knows all of this. cheers, Aus cheers, Aus
Fernando Castro Posted September 8, 2022 Author Report Posted September 8, 2022 1 hour ago, Ausman said: Please confirm that every plc is using the same OS, same version of Visilogic, same everything before you start the process. I have now installed DM to look at it better and I note that it has the ability to download everything to the plc, embedded into the file. Are you using this, or just doing the application? 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". 1 hour ago, Ausman said: I have now installed DM to look at it better 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 1 hour ago, Ausman said: My highlighted bit implies only a single PLC for Unidownloader Unidownloader is a different tool, I guess the intention is to compare the difference between those two 1 hour ago, Ausman said: But how do you make the UDC in the first place for multiple same units? 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.
Fernando Castro Posted September 8, 2022 Author Report Posted September 8, 2022 5 hours ago, Flex727 said: 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. 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!!!!!
MVP 2023 Flex727 Posted September 8, 2022 MVP 2023 Report Posted September 8, 2022 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.
Fernando Castro Posted September 8, 2022 Author Report Posted September 8, 2022 1 hour ago, Flex727 said: 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. 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 On 9/7/2022 at 9:29 AM, Fernando Castro said: 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 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.
MVP 2023 Ausman Posted September 8, 2022 MVP 2023 Report Posted September 8, 2022 Ok on all of that except the initial generation of the UDC that Download Manager then handles. ??? That was why I made my comment. Thought: Prior to the next step initiate the SD save on all; Then send out to all a blank project with just the necessary addresses for each specific plc in each blank project; As part of that project have the plc do an init and reset on first run of the blank project; Then do the correct download and load things from the SD, perhaps this might cure the issues? cheers, Aus
Fernando Castro Posted September 12, 2022 Author Report Posted September 12, 2022 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.
Fernando Castro Posted September 15, 2022 Author Report Posted September 15, 2022 On 9/12/2022 at 4:57 PM, Fernando Castro said: Maybe that was because I loaded the Backup operands after the upgrade and the previous program had a C6 Preset value of 0?, 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.
MVP 2023 kratmel Posted September 15, 2022 MVP 2023 Report Posted September 15, 2022 On 9/4/2022 at 12:40 AM, kratmel said: old school of programming where most of the work was done on paper. 1 hour ago, Fernando Castro said: The best way is to take pictures BEFORE the download and manually enter the values AFTER the download. This is the same old school but paperless 1
MVP 2023 Ausman Posted September 15, 2022 MVP 2023 Report Posted September 15, 2022 Ok, I'm being dumb here and have probably lost some of the complete amount of info in the topic...... If reloading presets is an issue, but having them in the first place is essential to ultimate correct operation, why not initially run from all presets for just a few scans on the first boot with outputs locked off, then automatically stop things and reload stored parameters from file. It might even be possible to have this all happen automatically, finally ending up with correct stuff. But I think this will likely get back to you having odd numbers appearing. I wonder if there's an easy way to singly check all parameters against what they're meant to be in the stored ones, and doing any corrections that are needed. It wouldn't take long for the plc to do this on its own, if it's possible. Thinking cap time....... cheers, Aus
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now