edgar.guerra Posted March 19, 2021 Report Share Posted March 19, 2021 Good Morning I want my program in visilogic to allow me that if I disconnect the power from the PLC when I turn it on, it is in the last screen I was using, could you tell me if it is possible? and how would it be done? i used a PLC V130-j-TR6 Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 Moved to the correct forum. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 2 minutes ago, Flex727 said: Movido al foro correcto. which one is that Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 This will work. You need just a few milliseconds of delay time to allow the Start-Up screen to fully load before trying to load the previous screen from before the PLC reset. SI 252 holds the screen number of the current screen. You just need to keep it stored continuously in a MI and then load that value into SI 252 almost immediately after the reset. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 00 the MI 0 used in the store block is designated or must be previously defined in some another part of the code Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 Just select any unused MI. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 this is the code for the inicialization of screens Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 4 minutes ago, Flex727 said: Simplemente seleccione cualquier MI no utilizado. i dont work Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 2 minutes ago, edgar.guerra said: yo no trabajo it didn't work Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 Let me see your code. What you posted above doesn't look anything like what I showed you. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 7 minutes ago, Flex727 said: Déjame ver tu código. Lo que publicaste arriba no se parece en nada a lo que te mostré. camara de vacio arreglo de HMI.vlp Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 How do I configure that MI 0 to be the allocated memory of the screen I am currently on Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 It doesn't work because you didn't use include the code I posted above. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 2 minutes ago, Flex727 said: No funciona porque no usaste incluir el código que publiqué arriba. the code is inside the main below the images that I shared what do you mean when you say don't use the include function Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 1 minute ago, edgar.guerra said: How do I configure that MI 0 to be the allocated memory of the screen I am currently on Copy the code I posted above except change T 0 and MI 0 to unused operands. Looking at your program, you can use T 30 and MI 100. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 1 minute ago, Flex727 said: Copie el código que publiqué anteriormente, excepto que cambie T 0 y MI 0 a operandos no utilizados. Mirando su programa, puede usar T 30 y MI 100. In the code it is in the main with T and M that I did not have in use, only that I gave them a name to be part that you gave me Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 SB 2 needs to be an inverted contact. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 I corrected it but it still works the same, it starts from the first screen defined Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 my error must be when using the MI he should save in the block the memory on the screen where I am Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 A big problem you have is that you are placing multiple logic threads in a single ladder rung. DO NOT DO THAT! Notice that the three lines of code I posted above are in three different ladder rungs. Put each line of code in a different ladder rung. That's the whole point of Ladder Logic - each ladder rung is one line of code. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 15 minutes ago, Flex727 said: Un gran problema que tiene es que está colocando varios subprocesos lógicos en un solo escalón de escalera. ¡NO HAGAS ESO! Observe que las tres líneas de código que publiqué arriba están en tres peldaños de escalera diferentes. Coloque cada línea de código en un escalón de escalera diferente. Ese es el objetivo de Ladder Logic: cada peldaño de la escalera es una línea de código. It already worked, thank you very much for your help, the error I was making applies to all lines of ladder code? Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 29 minutes ago, edgar.guerra said: the error I was making applies to all lines of ladder code? Yes, most of the time it doesn't cause a problem, but it's unpredictable. One line of code for each ladder rung. Notice all the compile warnings you are getting. One other problem, do not place the contact for a timer in the same rung as the timer coil. It doesn't cause a compile warning, but it is very poor form. Link to comment Share on other sites More sharing options...
edgar.guerra Posted March 19, 2021 Author Report Share Posted March 19, 2021 56 minutes ago, Flex727 said: Sí, la mayoría de las veces no causa ningún problema, pero es impredecible. Una línea de código para cada peldaño de la escalera. Observe todas las advertencias de compilación que recibe. Otro problema, no coloque el contacto de un temporizador en el mismo peldaño que la bobina del temporizador. No causa una advertencia de compilación, pero es una forma muy pobre. thank you very much for the advice and help Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted March 19, 2021 MVP 2023 Report Share Posted March 19, 2021 Phew! Well done, Flex. 1 Link to comment Share on other sites More sharing options...
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