Jump to content

Fernando Castro

Members
  • Posts

    264
  • Joined

  • Last visited

  • Days Won

    24

Posts posted by Fernando Castro

  1. 13 hours ago, kratmel said:

    I haven't tried to do something like password protection, but I think it's possible to run your own exchange Modbus commands using the Protocol FB when starting the PLC.

    I mean, you are not wrong but after doing that, I don't see the point on using Modbus. If you are already sending and receiving commands thru Protocol FB. then you can do your own thing and validate messages first then copy received values to a specific memory area. 

    I feel like the Modbus benefit is that is already a feature on a lot of devices. and you don't need to do an extra TCP/IP communication layer to send your data.

    All of us professionals in automation knows that Modbus does not offer any security and that is kind of a "legacy" protocol but still very relevant tool.... It's up to the controls engineer to design the network in a way that should be Isolated from "extrange devices."

    however, I have seen that the implementation of Modbus on other brands usually consist in two steps: 1. communication and 2. mapping the Modbus registers to actual registers inside of the PLC memory, which makes it easier to code too.

    To be honest if the application is critical, needs to use Modbus, and anyone could connect to the same network, then vison series PLCs are not the right tool for the job.

  2. For those ones that may have this problem in the future, there is an offline activator. you need to send the code generated to unitronics support in order to get the licensee code to input back to Visilogic:

    Hi Fernando,

    Go to the next path and use the Offline Activator :

    C:\Program Files (x86)\Unitronics\Unitronics VisiLogic_C\Main\Tools\Registration\VisiLogic Offline Activator

    For overwriting the files, you must ensure that VisiLogic is closed, and also make sure that VisiLogic Licensing is closed from the Task Manager.

    Then click on the "Offline Activator.exe", this will prompt a code.

     
    • Upvote 1
  3. I don't think that's possible... I mean Unitronics abandoned the project comparison tool for vision series, and there is not even a proper revision control way to deal with Unitronics.

    I am rewriting some of my visilogic project to another platform and at least its faster on the other end because I have more tools available. 

    Sorry.

    I always wondered if at the end it compiles everything to a pseudo structured text code, why it doesn't allow us to work directly on structured text, you could copy and paste and compare programs or work outside of the visilogic environment.

  4. 13 minutes ago, Flex727 said:

    I don't always start using the latest version of VisiLogic right away. Has this been added, or are you thinking of UniLogic?

    I think it has been there since a couple of versions, I discovered it last year, but I have been using the same version of visilogic from the past 2 years.

    image.png.037dc960a965e90534962c8e0fa6b816.png

    Color coding was a game changer for me... each time I compile and release I took the previous project as base version, and every change will be on the same color.

    in this case orange is for this version then I will export the sub to the next project (that also clears all the colors), the next revision will be taking the exported subs and I will use green for the changes.

    This way Is pretty much export/ import and the only part that I manually maintain rung by rung is the Main routine, on Wich I also take notes at the top of the new features and changes.

     

    • Upvote 1
  5. Since you are coming from a siemens environment and giving a dive on Unitronics some quick tips that will help to take into account:


    -Every memory value in UNITRONICS is retained by default unless you define a starting value on power-UP.
    -Subroutines are tricky, when not active the online view still shows the first rung inside the subroutines as ON, which doesn't mean that it's ON. that is kind of confusing.
    -In my experience on every Download there is a non-zero chance that you may override some values, so double-check that your program is sensitive to specific values for configurations.
    -In general read carefully the documentation, do not assume how functions work. 


    Trust me, I had 2 years working daily whit Unitronics, coming from Siemens/Codesys environments and I had a lot of headaches with those silly things.
    Also, revision control Is kind of difficult. If your project will require a lot of continuous changes, I advise using the option to add a color on the rungs, that way you can easily spot changes between revisions. 

  6. 16 hours ago, Joe Tauser said:

    Yes, you do need to use the PID AUTO-TUNE block for PID control.  Do not ask why - it is a Uni-Mystery.  

    But you don't have to run the PID A. TUNE AUTO-TUNE function.  It will work fine if you just call the configuration block on the first scan, set your own PID parameters, and then just call the RUN block. 

    Joe T.

    🤣, Uni-Mistery.

    Thanks Joe, just wanted to be sure that I understood correctly, before diving in to the PID implementation.

  7.  

    So, I need to implement a PID control Loop for temperature control, and I was reading the documentation, but this part is not clear to me:

    image.thumb.png.e21ffb3289d90bd47d016735db05a19a.png

    Does this mean that I can only use PID AUTO -TUNE, and I cannot use the regular PID functions on V700 and V570?
    I mean that's what it says but maybe is a translation issue or I am understanding it wrong.
    I mean the function blocks and the documentation of  PID AUTO-TUNE seem straightforward, but that means that I will not be able to enter the parameters manually.
    for example, I don't have everything ready to test the loop, but I at least would like to run the PID functions, just to test the logic part of the program (Enabling the Temperature Controller, making sure that the values have the correct linearization, test that the stop/pause/reset functions, prompts and all other features I already had to interact correctly between each other)
    For this I don't need to have the PID properly tuned, it will be useful just to see that there Is an Output being sent by the PLC.

    Thanks in advance

  8. On 12/5/2022 at 11:12 AM, Jacob Bauer said:


    All in all my experience with SD-cards haven't been to good. I just don't find it stable/reliable. I have a setup with an internet connected router, a plc and a lot of data being stored from sensors. Is it possible to send the data directly to a server instead? The UniCloud solutions becomes a bit expensive, if you have many or frequent data points. 
     

    I can give you the solution that you are looking for. I Inherited a project with a bunch of PLCs, the SD card storage solution + trends recording of the PLCs was not good enough, and the process to collect all that data and dump it in the same place was slow and painful... plus time-to-time I got corrupted SD cards.

    You can do it even better without OPC server and please avoid using spread sheets to store your data.

     

    Take note, this will save you a lot of Money and it's even more powerful than UniCloud, and relatively easy to implement and it is scalable.... and the best of all no licenses needed:

    1. Enable a field Bus to collect the data: MODBUS TCP/IP is the best way.

    2. Get a Server and Connect your PLCs to  the same network. 

    3. Use InfluxDB OSS  as database: InfluxDB Times Series Data Platform | InfluxData | InfluxData, You will need to configure Telegraf (InfluxDB data collector agent) to use MODBUS TCP/IP.

    4. Use Grafana Grafana OSS | Metrics, logs, traces, and more to create dashboards and trends, to analyze and visualize your data.

    This Stack IS way more powerful than any SCADA software for monitoring the data.

     

     

     

     

    • Thanks 1
  9. Today I found out a funny thing... those silly ones that make you want to bang your head against the wall.
    Let's name the development project A and the production project B

    So, I was adding a new feature to project A (which in general has some experimental things). when I was happy with the result, I exported a subroutine packing all related to this new feature in it, to project B.
    However, this case project B had one of the MIs used in that subroutine, previously assigned to an alarms group.

    image.png.f571976ef75143df1c0a3b87c8b44e0c.png

    image.png.2df517a48c8260cf94de6c83e13f8263.png

     

    This was not a big deal since that alarm group was declared at some point in time, but since I never added anything at all, I decided to delete Group 5 from the alarms.
    Did a quick search of MI166 to make sure that is not being used in any other place and proceeded with the changes, as usual, compile, download and test.

    image.png.2091d69003305836e378616ce418254a.png

    So, after deleting and testing happened that I wasn't able to use MI166, it was always overriding whatever value I stored on it to a 0 value.
    I felt dumb after investing a lot of time in searching all vector-related functions (I believed that I may have been storing that 0 value by accident while using some vector).
    And then I remember the alarm group... It couldn't be right. why that should be interfering with the rest of the code if I already had it deleted?

    So, I decided to create it again, and it auto-populated with the same MIs and MBs, I re-assigned new MIs and MBs to it:

     

    image.png.ebc11d8b1733027ece2af9b358605f02.png

    And only then I was able to properly use MI166.

    I know that it would have been faster just to choose another MI instead of MI166, but I needed to get to the bottom of this Mystery.

    So, if someone gets one of these rebel registers that refuses to cooperate, it may be worth it to take a look at the alarms.

     

  10. 12 hours ago, jesuscardenas said:

    I have managed to download the software, but apparently it tells me that in order to use the printer mode, I should have the printing roller as master and the transmission chain as slave. Here I would have a problem since the transmission chain is commanded by a variator of frequency

    16674882596522564194556737438294.jpg

    I've seen these applications (not with the hardware that you have )   in order to use the VFD as the Main system and a servo motor as a "cam follower" you need feedback, the VFD does not give you feedback actually it just adjust the frequency output to have a given velocity but it is an open loop, you can not actually know if the motor is ispinning at the real RPM  that the VFD says, for that you need an encoder, then you can use the encoder feedback to set an slave servo motor to "follow" the main one 

     

  11. 10 hours ago, jesuscardenas said:

    Hello kratmel, I am using a DELTA ASDA A2 servo motor for the print roller.
    Originally both axes were linked by mechanical gears, but later the axes became independent, 
    removing the gears in order to quickly power the printing roller (for rectification/repair services), 
    This led to the task of performing an electronic synchronization

    He visto muchas aplicaciones en las cuales se sustituye la mecánica tradicional por "levas electrónicas". definitivamente es posible sin embargo no veo unitronics (vision series) como el hardware adecuado para esa aplicación.

    En temas de sincronización por servomotores incluso marcas de mayor renombre tienen hardware específico, los famosos "Motion controllers", simple y sencillamente se requiere de hardware mas "potente" para poder hacer los cálculos y corrección al vuelo.



     

     

     

  12. 7 hours ago, Dbroker said:

    Yes I am talking about a recipe. Instead of manually downloading a new recipe to the PLC every time the job changes, I would like to have it done automatically based on a particular input the PLC recieves. 

    Fixture is powered up. Using the power up bit and a physical input the PLC changes the recipe and clones/downloads from the SD the new job recipe.

    I also don't think you need to use the SD card at all, you can store a lot of data tables with a lot of variables and a lot of steps inside the PLC memory.

     

    I use 1007 steps each one with 8 variables per recipe and other 3 data tables ( 14 x 5 ) to store machine specific parameters.

    In my case we were doing a lot of experiments and needed to be able to remotely manage new recipes for many PLC, s so SD card explorer was the easiest way to do it.

    also, I do not recommend installing new programs for each fixture you may find old parameters stored on addresses in the PLC memory (every previous value is retained unless you specify a startup value, and even doing that that it may be tricky for counters and timers) it may cause some headaches to trouble shoot.

     

    I had a recent post on where I described all my headaches trying to automate the program upgrade of my PLCs.... Now I do a lot of screenshots each time I do a PLC upgrade

    trust me I gave up on that.... And I do not give up easily
     

     

     

  13. 7 hours ago, Dbroker said:

    I know you can download to the PLC a program off the SD card but is there a way to set up to do that automatically based on an input?

    Looking at running multiple jigs in a fixture frame and the V700 we use I don't see having enough memory to store multiple job applications. So my next idea is to store multiple jobs on an SD card and download from there but not sure if it can actually be done.

    yes but also you are describing something like a recipe?, I made a program that runs based on recipes, and the recipes are stored on the SD card as data tables. If your logic allows you to do it like that it will be faster, downloading an entire new program feom the SD will take like 15 minutes 

  14. you can also log in with visilogic and under connection / communication & OS/ In the Gear tab, set RTC 

    that will sync the PLC time with the computer time.

     

    image.png.0afc76ac1d836d19e0ad4ddcca2cf013.png

     

    I f your customer is in another country you could use team viewer or something like that to access to a remote computer that will be connected to the PLC... assuming that you or your customer have one for that.

     

  15. 58 minutes ago, Joe Tauser said:

    The best sensor for high speed is an encoder.

    You could put a toothed pulley on the main shaft and couple it to an encoder mounted next to it with a timing belt.  The PLC has a high-speed input on I0 designed for this.

    Joe T. 

    As Joe T. an encoder is the best way to measure speed/revolutions.

    On 10/20/2022 at 2:13 AM, draganjr said:

    a Sick IME12-04BPSZC0S.  Switching freq is 2000 Hz.

    The switching frequency is not the problem. Is the way the sensor works.

    those are inductive sensors the sensing depends on the material and distance this one was designed to be used mounted "flush", and even being within the range (3.4 mm) technically only the tangent point of the bar (a very small area will be in the range of the sensor). so, it is no surprising to me that it doesn't sense well.

    I bet you that it will work better if its mounted parallel to the shaft and having some metal part attached or a longer screw pointing to the sensor

    Although the accuracy won't be as good as an encoder, you will have a pretty good repeatability even at higher speeds

    If you want to buy an encoder Sick has encoders that you can attach to the shaft, and they are like from very basic to very smart ones.

  16. It is definitively an issue with the touchscreen check as @kratmel said.

     

    here it is this funny thing: Yesterday I was moving around some things on my desk and left something pressing the screen on my test PLC, when I noticed it was on the calibration screen, and I thought what are the chances that it happens to be pressed in the spot of the calibration screen menu.

  17. On 10/10/2022 at 2:56 PM, 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.

    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.

    If you use Microsoft one drive folder to save your projects, then usually it is possible to restore to previous versions of the same file, one drive creates copies every time the file is modified, and it is easy to manage.

  18. On 10/9/2022 at 11:04 AM, der_bruchpilot said:

    Those who can read have a clear advantage.

    That was the problem. I only saw the software-parameters and diddn't realize, that there olso some hardware jumpers.

    Thank you very much.

    like a former colleague used to say, "I'm not an expert, I just read the manuals" (though, He actually was the expert in that company he was the product manager of PLCs)

  19. 15 hours ago, Ausman said:

    but I'm curious to see whether b/n your steps 2 & 3 you did an online look at parameters, and also ran an Operands Not Reference query.

    I did not understood what you mean, could yo please clarify ?

     

    15 hours ago, Ausman said:

    Some years back I had a similar thing happen that did not run an SD that sent me a bit nuts, and the only thing that cured it was a number of Init and Resets....not just one.....on a blank program.  I found some elements hanging around with numbers other than 0, even though this shouldn't happen.  Also make sure your data tables are completely cleared during doing all of this, too.

    Now that you mentiomed that, I tought that the blank project cleared the operands, then on Info mode saw some of them still not "Blank"  So i did the PLC init, is there any other way to clear entirely the PLC. Regarding the the data tables in my experience if not being re-written manually usually keep random values, is there a way to clesr all of them at once?

  20. 1 hour ago, John_R said:

    I've had odd things happen like this from a dirty touch screen, a funny spot in the touch screen right where the HMI button is...

    Also, I use to leave the factory film on the screen, thinking it was good protection, but also found this can cause strange touch screen issues.

    Just food for thought...🤔

    JohnR

    Definitively not the case, but I have seen a considerably number of posts related to that specific problem with the touchscreen.
    I was able to see on online mode the exact moment when MB 129 reseted, and when that happened the Screen that was being shown was other than the one that has that button
    Thanks anyway.

    5 hours ago, Flex727 said:

    I'm going to say I had a similar issue many years ago. My memory is a bit fuzzy as to the specifics, but I also had a single bit that refused to cooperate. I never found the cause and finally decided to move the MB to another address and the problem was solved.

    Thanks, I feel like I'm not crazy... Other colleagues that are PLC programmers did not believe me I must be doing something wrong in the logic they said 🤣.

    I am not saying that I don't make mistakes, but being on just this one PLC and with a well-tested program I don't think that that is the case

     

     

    10 hours ago, kratmel said:

    SD card must be changed for test.

     

    I did not think on testing that... I don't see how it is related but this Is oddly enough to make me stop trying to find a logical explanation.

  21. I know that it sounds weird, but I don't have any other explanation.
    first of all, let me tell you that I have one PLC (V700) on Wich on parameter seemed to be changing itself randomly. I don't think that its randomly because I was able to systemic repeat that problem (only on that PLC)
    I also have the same version of software installed on other PLCs (so far at least 10 running with no issues). Today I decided to tackle that problematic PLC so, I downloaded the most recent version of my software as follows:
    1. First I did a Blank project download, with a burn upload project.
    2. I went into info mode and did a plc Init to leave it entirely "virgin".
    3. I downloaded the program using Unitronics download manager as I usually do with all my other PLCs.
    4. I entered manually all the parameters required to run the machine this bit must be "SET" in this particular machine.
    5. I did the machine's normal operation and then could spot exactly when that tricky bit was changed (after I loaded a recipe from the SD card and the confirmation of successfully read appeared on my HMI).
    6. Checked the setting and the bit had a "RESET" value

    This is where that bit is being used, and can only be changed in 3 ways:

    image.png.216c2bd494c26b606b0a00dc15d290a8.png

    1. Is a setting, so naturally, it is linked to an HMI button.
    2. When loading the default settings button (Buried 3 screens deep and needs to be manually triggered, also that defaults to "SET")
    3. As you can see there is a RESET coil linked to that bit, and this is a feature Not a bug, let me explain:
    That setting is to select which type of sensor to use. There is an external control loop that is driven by a valve and a sensor, we have brands A, and B. valve A works with either sensor B or sensor A, but B valve can only work with sensor B, given this scenario, proper settings need to be entered on HMI to scale the readings of the sensor depending on if its A or B.
    so, if valve B is selected on HMI, sensor B is forced:

    image.png.61f01b3fdc58955266b4319eb7f17f41.png


    This is the usage of MB122:

    image.png.ce634a61ae5e1a592496283c8153b4db.png

    Again, 
    1. Linked to an HMI button.
    2. When loading the default settings button.

    So, I am confident that is not a problem with my logic. I also already look at all the MBs used on the function that loads files from the SD card (the trigger that happens to RESET MB129), thinking that maybe somehow, I am overriding that value with any vector operation and all MB'S used on that entire subroutine are in the 2000's range (I usually try to reserve my operands by functions to avoid those kinds of problems).

    image.png.ebf48b8a48da749feb9a384a9665e906.png

    image.png.c065581ce21efb92440000df503dba49.png

     

    Finally, I gave up and tried to replicate the problem on another PLC in my bench, downloaded the same software, imported operands from the faulty PLC then exported the operands to the bench PLC.
    The PLC works as intended. Doing the same steps MB129 is not being RESET after loading the recipe.

     

    I really don't want to say it, but it seems that it is the PLC that is not doing what was programmed to do.

  22. On 10/2/2022 at 5:49 AM, der_bruchpilot said:

    I have also problems with the analog inputs of a V350-35-R34. At first I took a PT1000 probe with 4-20 mA converter with 2-wire-connection. Nothing happend and I thought it was about a too low voltage to drive the converter. So then I used a adjustable signal generator with externel power supply. That generater works proper fine without  the PLC. With the PLC  there are running only 3.2 to 3.5 mA. What is my problem? Perhaps sombody can help me.

    Thanks in advance

     

    Are you sure that have the correct settings on the dip switches on the PLC? at least on the ones that I use there is  a setting in the software but you need to also change a dipswitch inside the PLC.

  23. 45 minutes ago, ZK0 said:

    I understand, thank you very much for your responses. The reasoning behind this was that I am trying to control a solenoid and two DC motors, with direction switching, using only the 6 relay outputs. Simplified to clarify, motor 1 may be controlled by outputs 0 and 1, then motor 2 may be controlled by outputs 1 and 2, so pressing one button would set Os 0 and 1 and another button would set Os 1 and 2. I have ended up just splitting the two functions into different sub routines, rather than controlling everything from one screen. 

    Thats the use of set reset, and any way the other option is to use flags or auxiliar contacts to use one single output.... at the end ladder logic is like an rlectrical diagram, you just can not have duplicate coils, but you could have many contacts  that can set the same coil based on different conditions.

     

    I don't want to be that guy, but the way you are trying to solve this problem is not correct. for now it may work, but if you keep doing your logic like this... its going to be a mess and hard to troubleshoot.

     

    Trust me, I've been there ...when I was still learning. good practices and well structured code will save you a lot of time in the future.

     

×
×
  • Create New...