Administrator

Hi Netza,
I've look at your program. Your problem is that LD networks (in botella1) are calculated sequentially, one after another. And if you reset variable in the first network, then it's OFF in the next. This is why your state machine doesn't work. If you inverse order of your LD networks in botella1, then the program start to work (see attached archive), but only until E6, E7. I don't understand what you exactly wanted to do with timer T1. BTW it's why better to use SFC language to describe state machines like this. Have you tried it?  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel 
Thank you Andrey Skvortsov
That was amazing, I never see that, in all the steps I am using the transition from one state to an other with one logic variable without time and in the states E6 to the E7 I am using one delayed variable to make the transition.
Why I am using equation instead of use SFC is to proof that the equations deduced by hand can work.
Thank you again.
My best regards
Netza
From: Andrey Skvortsov <[hidden email]>
Sent: Tuesday, July 10, 2018 2:32 PM To: beremizdevel Subject: [Beremizdevel] why the plc equation doesnot work? Hi Netza,
I've look at your program. Your problem is that LD networks (in botella1) are calculated sequentially, one after another. And if you reset variable in the first network, then it's OFF in the next. This is why your state machine doesn't work. If you inverse order of your LD networks in botella1, then the program start to work (see attached archive), but only until E6, E7. I don't understand what you exactly wanted to do with timer T1. BTW it's why better to use SFC language to describe state machines like this. Have you tried it?  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel 
From: Netza Guadarrama <[hidden email]>
Sent: Wednesday, July 11, 2018 2:05 AM To: Netza Guadarrama Subject: Re: [Beremizdevel] why the plc equation doesnot work? Hello Andrey Skvortsov
I am testing the program that work until the last step but to pass from the last step to the first step can not go because as you said the variable is not active.
I can not understand why it work like this.
My best regards
Netza
From: Netza Guadarrama <[hidden email]>
Sent: Wednesday, July 11, 2018 1:48 AM To: Andrey Skvortsov; beremizdevel Subject: Re: [Beremizdevel] why the plc equation doesnot work?
Thank you Andrey Skvortsov
That was amazing, I never see that, in all the steps I am using the transition from one state to an other with one logic variable without time and in the states E6 to the E7 I am using one delayed variable to make the transition.
Why I am using equation instead of use SFC is to proof that the equations deduced by hand can work.
Thank you again.
My best regards
Netza
From: Andrey Skvortsov <[hidden email]>
Sent: Tuesday, July 10, 2018 2:32 PM To: beremizdevel Subject: [Beremizdevel] why the plc equation doesnot work? Hi Netza,
I've look at your program. Your problem is that LD networks (in botella1) are calculated sequentially, one after another. And if you reset variable in the first network, then it's OFF in the next. This is why your state machine doesn't work. If you inverse order of your LD networks in botella1, then the program start to work (see attached archive), but only until E6, E7. I don't understand what you exactly wanted to do with timer T1. BTW it's why better to use SFC language to describe state machines like this. Have you tried it?  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel mymodbusarm22.tar.gz (244K) Download Attachment 
Administrator

In reply to this post by Netzahualcoyotl
Hi Netza,
in your new program the problem for not switching between E11 and E0 is the same as before. You reset E11 in first network and then check (already reset value) it in the last network. Therefore E0 is still false. I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD for your program. See attached program. BTW do clean program before packing it into archive. In this case archive will be very small and will no trigger mailing list message limit (150kb). > Hello Andrey Skvortsov > > I am testing the program that work until the last step but to pass from the last step to the first step can not go because as you said the variable is not active. > I can not understand why it work like this. > My best regards > > Netza > > On 180711 01:48, Netza Guadarrama wrote: > > Thank you Andrey Skvortsov > > > > That was amazing, I never see that, in all the steps I am using the transition from one state to an other with one logic variable without time and in the states E6 to the E7 I am using one delayed variable to make the transition. > > > > Why I am using equation instead of use SFC is to proof that the equations deduced by hand can work. > > > > Thank you again. > > > > My best regards > > > > Netza > > ________________________________ > > From: Andrey Skvortsov <[hidden email]> > > Sent: Tuesday, July 10, 2018 2:32 PM > > To: beremizdevel > > Subject: [Beremizdevel] why the plc equation doesnot work? > > > > Hi Netza, > > > > I've look at your program. Your problem is that LD networks (in botella1) are calculated sequentially, one after another. > > And if you reset variable in the first network, then it's OFF in the next. This is why your state machine doesn't work. > > If you inverse order of your LD networks in botella1, then the program start to work (see attached archive), but only until E6, E7. > > I don't understand what you exactly wanted to do with timer T1. > > > > BTW it's why better to use SFC language to describe state machines like this. Have you tried it? > > > >  > > Best regards, > > Andrey Skvortsov Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel 
Hello Andrey Skvortsov
I appreciate a lot your suggestions and solutions, but the principal objective of this kind of implementation is to proof that the plc equations work.
The way how I made the equations is like this
Estate = (Sum of all logic conditions that put on the state)(negated products of all logic conditions that put off the state)
This equation include the set or reset functions using just logic conditions is not needed to use explicit set or reset functions.
But, I need to proof that the plc work with that equations.
Thats way I need to use just logic functions as products and sums and negations only.
But in the implementations as you said the logic variable change from true to false, but all the calculations with that variable before change are not finished, because there are a lot of equations that use that variable before change. May be I am wrong to
think like that but we are in the logic process where first the logic need to be calculated before to put all the values on the outs.
In the implementation that I put now is using the fact that is falling the value from true to false because I think maybe I am wrong that the implementations of the plc logic is not ok.
I am confusing.
I need help to understand the process on how is working the logic.
my best regards
Thank you again for your time.
Netza
From: Andrey Skvortsov <[hidden email]>
Sent: Wednesday, July 11, 2018 10:08 AM Cc: beremizdevel Subject: Re: [Beremizdevel] why the plc equation doesnot work? Hi Netza,
in your new program the problem for not switching between E11 and E0 is the same as before. You reset E11 in first network and then check (already reset value) it in the last network. Therefore E0 is still false. I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD for your program. See attached program. BTW do clean program before packing it into archive. In this case archive will be very small and will no trigger mailing list message limit (150kb). > Hello Andrey Skvortsov > > I am testing the program that work until the last step but to pass from the last step to the first step can not go because as you said the variable is not active. > I can not understand why it work like this. > My best regards > > Netza > > On 180711 01:48, Netza Guadarrama wrote: > > Thank you Andrey Skvortsov > > > > That was amazing, I never see that, in all the steps I am using the transition from one state to an other with one logic variable without time and in the states E6 to the E7 I am using one delayed variable to make the transition. > > > > Why I am using equation instead of use SFC is to proof that the equations deduced by hand can work. > > > > Thank you again. > > > > My best regards > > > > Netza > > ________________________________ > > From: Andrey Skvortsov <[hidden email]> > > Sent: Tuesday, July 10, 2018 2:32 PM > > To: beremizdevel > > Subject: [Beremizdevel] why the plc equation doesnot work? > > > > Hi Netza, > > > > I've look at your program. Your problem is that LD networks (in botella1) are calculated sequentially, one after another. > > And if you reset variable in the first network, then it's OFF in the next. This is why your state machine doesn't work. > > If you inverse order of your LD networks in botella1, then the program start to work (see attached archive), but only until E6, E7. > > I don't understand what you exactly wanted to do with timer T1. > > > > BTW it's why better to use SFC language to describe state machines like this. Have you tried it? > > > >  > > Best regards, > > Andrey Skvortsov  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel solution3.tar.gz (16K) Download Attachment 
Hello Daniel Mirkin
If you can see the issue, the issue is that the logic need to be solved before express outs.
<Spanish>
Claro si asi gustas.
Me gustaria platicar por correo, por que no siempre estoy en la pc viendo o mandado mensajes.
</Spanish>
Netza
From: Daniel Mirkin <[hidden email]>
Sent: Sunday, July 15, 2018 2:59 AM To: [hidden email] Cc: Andrey Skvortsov; [hidden email] Subject: Re: [Beremizdevel] why the plc equation doesnot work? Dear Andrey, dear Netza:
Perhaps I've "catched" Netza's wishes.
So I've wrote an example on how to execute sequential tasks using only boolean operations AND, OR, NOT, expresed in a LD diagram.
Of course, I consider preferable to use set/reset operations, as Serguey recommends; my program "squeezes" the PLC scan cycle.
BTW: I hope I have not made serious mistakes in the logic of my program ;)
Attached Beremiz_sequential_LD.zip.
Please, read the comment on top of the LD graphic area.
Feel free to adopt, amend, rectify or discard it...
OT?: SFC certainly is a great descriptive language; but IMHO executable compilations from Ladder are more succint, and allows a more strict control on execution
flow (in this aspect, LD only can be defeated by IL in the IEC 6111313 boxing ring).
<spanish>
Hola, Netza.
Es un placer encontrar un hispanohablante en esta lista.
Vivo en Mar del Plata, Argentina; me dedico a automatizaciÃ³n en entornos industriales, residenciales, y de servicios (urbanos y rurales) de baja y media complejidad.
Â¿Te interesarÃa continuar la conversaciÃ³n mediante Google Hangouts, o seguir intercambiando informaciÃ³n y experiencias por email, en nuestro propio idioma?
Espero tus opiniones.
Saludos cordiales,
</spanish>
@Andrey:
I have a lot of questions on installing Beremiz_service in a headless (non GUI) Raspbian on Raspberry Pi; also on Modbus RTU extensions, and on svgUI.
Soon, I will write some emails about these topics.
I prefer to write one email on each topic, to avoid "saturation"; what do you think about?
Best regards,
El miÃ©., 11 jul. 2018 a las 20:40, Netza Guadarrama (<[hidden email]>) escribiÃ³:
 Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel 
In reply to this post by Netzahualcoyotl
@[hidden email].
Resending my previous email, changing attached compressed archive type from .zip to .tar.bzip2; becauseÂ lists.sourceforge.net apparently rejects .zip archive. CHANGED: PouringTime variable type from INTEGER to TIME.  @Netza: <quote> I appreciate your suggestion, but it suggestion is not resolving the Objective, that is using the PLC Equation and it need to work. </quote> I'm sorry, I don't understand your pointÂ yet. My LD program can be converted in a boolean equation. As example, Stage11 can be converted as follows, after manual simplification (and deleting Mx=Ex redundant statements): E11=((E11)+(i*E10))*(!E0) This equation es expressed as "State(StageX) = (Sum of all logic conditions that put on the state)(negated products of all logic conditions that put off the state)" as you need. I will try to write a simplified LD without M0M11 marks, and then test if it works. Obviously, this will lead in a direct simplified equation... <quote> If you can see the issue, Â the issue is that the logic need to be solved before express outs. In my LD program, Stages E0E11 outputs are MARKS (internal, local bit memories), and real outputs Q1Q6 are writted at the end of every scan cycle (see at the bottom of the LD diagram). This is the understood behavior in industial PLC runtimes, but I don't know if this feature is implemented in Beremiz soft PLC. So, specifically in my attached LD program, LD stages logic (equations) are evaluated (solved) BEFORE outputs states are "writed" (changing its states). @Andrey: could you explain if BeremizIDE "automagically" implements standard PLC cycle when compile user program?Â i.e.: 1. Read digital and analog inputs and store its states and values in dedicated memory areas (inputs process image); 2. Evaluate logic (expresed in one or various IEC 611313 languages). Â Â Each output state must be writed to a dedicated memory area (outputs process image), not immediatly transferred to real outputs; 3. Communication processing; 4. Integrity self autochecking; 5. Transfer outputs process image to real outputs. Or perhaps must be expressly implemented these procedures in user programs? BTW: in LDmicro [1], a "quasiIEC611313" Ladder editor for some Microchip PIC and Atmel microcontrollers, real (physical) inputs are read DURING program evaluation; and outputs are immediatly writed DURING program evaluation, if they appears as outputs in intermediate LD rungs. So, to achieve a standard PLC cycle on it, inputs and outputs process imagesÂ must expressly be implemented (programmed)Â in user program. Best regards, Daniel Mirkin [hidden email] Cel. +54 9 223 524 2171  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel Beremiz_sequential_LD.tar.bz2 (7K) Download Attachment 
Administrator

In reply to this post by Netzahualcoyotl
On 180711 23:07, Netza Guadarrama wrote:
> Hello Andrey Skvortsov > > I appreciate a lot your suggestions and solutions, but the principal > objective of this kind of implementation is to proof that the plc > equations work. > The way how I made the equations is like this > Estate = (Sum of all logic conditions that put on the state)(negated > products of all logic conditions that put off the state) > This equation include the set or reset functions using just logic > conditions is not needed to use explicit set or reset functions. > But, I need to proof that the plc work with that equations. > > Thats way I need to use just logic functions as products and sums and negations only. > > But in the implementations as you said the logic variable change > from true to false, but all the calculations with that variable > before change are not finished, because there are a lot of equations > that use that variable before change. May be I am wrong to think > like that but we are in the logic process where first the logic need > to be calculated before to put all the values on the outs. > In the implementation that I put now is using the fact that is > falling the value from true to false because I think maybe I am > wrong that the implementations of the plc logic is not ok. > I am confusing. > I need help to understand the process on how is working the logic. The problem is that the networks are evaluated sequentially. I've checked standard and couldn't found place where it's said that every network should use values of variables at the moment of beginning of current PLC cycle. Standard clearly says that all network evaluated sequencially from top to bottom and next evaluation should started after previous evaluation is done. I checked your problem in CODESYS v2 (see attached screenshot) and behavior is the same as in Beremiz. So your LD program wouldn't work. I think CODESYS v3 works the same and I do remember the same behavior from working with some other PLC IDE a long time ago. You could solve your problem if all assignments would be part of the same network. Unfortunately this will not work in Beremiz, because now all assignments are calculated separately, even inside the same network. This is known bug and is already in our bug tracker. https://bitbucket.org/automforge/beremiz/issues/31/wrongstcodegeneration > my best regards > > Thank you again for your time. > > Netza > ________________________________ > From: Andrey Skvortsov <[hidden email]> > Sent: Wednesday, July 11, 2018 10:08 AM > Cc: beremizdevel > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > Hi Netza, > > in your new program the problem for not switching between E11 and E0 is the same as before. > You reset E11 in first network and then check (already reset value) it in the last network. > Therefore E0 is still false. > I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD for your program. > See attached program. > > BTW do clean program before packing it into archive. In this case archive will be very small > and will no trigger mailing list message limit (150kb). >  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel Screenshot from 20180716 230212.png (44K) Download Attachment signature.asc (849 bytes) Download Attachment 
Administrator

In reply to this post by Netzahualcoyotl
Hi Daniel,
On 180714 23:59, Daniel Mirkin wrote:\ > Dear Andrey, dear Netza: > > Perhaps I've "catched" Netza's wishes. > So I've wrote an example on how to execute sequential tasks using only > boolean operations AND, OR, NOT, expresed in a LD diagram. > Of course, I consider preferable to use set/reset operations, as Serguey > recommends; my program "squeezes" the PLC scan cycle. > BTW: I hope I have not made serious mistakes in the logic of my program ;) > > Attached Beremiz_sequential_LD.zip. > Please, read the comment on top of the LD graphic area. > Feel free to adopt, amend, rectify or discard it... > > OT?: SFC certainly is a great descriptive language; but IMHO executable > compilations from Ladder are more succint, and allows a more strict control > on execution flow (in this aspect, LD only can be defeated by IL in the IEC > 6111313 boxing ring). code is available by clicking "ST" button on the toolbar. > @Andrey: > I have a lot of questions on installing Beremiz_service in a headless (non > GUI) Raspbian on Raspberry Pi; also on Modbus RTU extensions, and on svgUI. > Soon, I will write some emails about these topics. > I prefer to write one email on each topic, to avoid "saturation"; what do > you think about? Separate topics is a good idea. Thanks. > > Best regards, > > > *Daniel [hidden email] <[hidden email]>* > *Cel. +54 9 223 524 2171* > > > El miÃ©., 11 jul. 2018 a las 20:40, Netza Guadarrama (<[hidden email]>) > escribiÃ³: > > > Hello Andrey Skvortsov > > > > I appreciate a lot your suggestions and solutions, but the principal > > objective of this kind of implementation is to proof that the plc equations > > work. > > > > The way how I made the equations is like this > > > > Estate = (Sum of all logic conditions that put on the state)(negated > > products of all logic conditions that put off the state) > > > > This equation include the set or reset functions using just logic > > conditions is not needed to use explicit set or reset functions. > > > > But, I need to proof that the plc work with that equations. > > > > Thats way I need to use just logic functions as products and sums and > > negations only. > > > > But in the implementations as you said the logic variable change from true > > to false, but all the calculations with that variable before change are not > > finished, because there are a lot of equations that use that variable > > before change. May be I am wrong to think like that but we are in the logic > > process where first the logic need to be calculated before to put all the > > values on the outs. > > > > In the implementation that I put now is using the fact that is falling the > > value from true to false because I think maybe I am wrong that the > > implementations of the plc logic is not ok. > > > > I am confusing. > > > > I need help to understand the process on how is working the logic. > > > > my best regards > > > > Thank you again for your time. > > > > Netza > >  > > *From:* Andrey Skvortsov <[hidden email]> > > *Sent:* Wednesday, July 11, 2018 10:08 AM > > *Cc:* beremizdevel > > *Subject:* Re: [Beremizdevel] why the plc equation doesnot work? > > > > Hi Netza, > > > > in your new program the problem for not switching between E11 and E0 is > > the same as before. > > You reset E11 in first network and then check (already reset value) it in > > the last network. > > Therefore E0 is still false. > > I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD > > for your program. > > See attached program. > > > > BTW do clean program before packing it into archive. In this case archive > > will be very small > > and will no trigger mailing list message limit (150kb). > > > > > Hello Andrey Skvortsov > > > > > > I am testing the program that work until the last step but to pass from > > the last step to the first step can not go because as you said the variable > > is not active. > > > I can not understand why it work like this. > > > My best regards > > > > > > Netza > > > > > > On 180711 01:48, Netza Guadarrama wrote: > > > > Thank you Andrey Skvortsov > > > > > > > > That was amazing, I never see that, in all the steps I am using the > > transition from one state to an other with one logic variable without time > > and in the states E6 to the E7 I am using one delayed variable to make the > > transition. > > > > > > > > Why I am using equation instead of use SFC is to proof that the > > equations deduced by hand can work. > > > > > > > > Thank you again. > > > > > > > > My best regards > > > > > > > > Netza > > > > ________________________________ > > > > From: Andrey Skvortsov <[hidden email]> > > > > Sent: Tuesday, July 10, 2018 2:32 PM > > > > To: beremizdevel > > > > Subject: [Beremizdevel] why the plc equation doesnot work? > > > > > > > > Hi Netza, > > > > > > > > I've look at your program. Your problem is that LD networks (in > > botella1) are calculated sequentially, one after another. > > > > And if you reset variable in the first network, then it's OFF in the > > next. This is why your state machine doesn't work. > > > > If you inverse order of your LD networks in botella1, then the program > > start to work (see attached archive), but only until E6, E7. > > > > I don't understand what you exactly wanted to do with timer T1. > > > > > > > > BTW it's why better to use SFC language to describe state machines > > like this. Have you tried it? > > > > > > > >  > > > > Best regards, > > > > Andrey Skvortsov > > > >  > > Best regards, > > Andrey Skvortsov > > > >  > > Check out the vibrant tech community on one of the world's most > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > > _______________________________________________ > > Beremizdevel mailing list > > [hidden email] > > https://lists.sourceforge.net/lists/listinfo/beremizdevel > >  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel signature.asc (849 bytes) Download Attachment 
Administrator

In reply to this post by skv
On 180716 23:32, Andrey Skvortsov wrote:
> On 180711 23:07, Netza Guadarrama wrote: > > Hello Andrey Skvortsov > > > > I appreciate a lot your suggestions and solutions, but the principal > > objective of this kind of implementation is to proof that the plc > > equations work. > > > The way how I made the equations is like this > > Estate = (Sum of all logic conditions that put on the state)(negated > > products of all logic conditions that put off the state) > > > This equation include the set or reset functions using just logic > > conditions is not needed to use explicit set or reset functions. > > > > But, I need to proof that the plc work with that equations. > > > > Thats way I need to use just logic functions as products and sums and negations only. > > > > But in the implementations as you said the logic variable change > > from true to false, but all the calculations with that variable > > before change are not finished, because there are a lot of equations > > that use that variable before change. May be I am wrong to think > > like that but we are in the logic process where first the logic need > > to be calculated before to put all the values on the outs. > > > In the implementation that I put now is using the fact that is > > falling the value from true to false because I think maybe I am > > wrong that the implementations of the plc logic is not ok. > > > I am confusing. > > I need help to understand the process on how is working the logic. > > The problem is that the networks are evaluated sequentially. > I've checked standard and couldn't found place where it's said that > every network should use values of variables at the moment of > beginning of current PLC cycle. > > Standard clearly says that all network evaluated sequencially from top > to bottom and next evaluation should started after previous evaluation > is done. > > I checked your problem in CODESYS v2 (see attached screenshot) and > behavior is the same as in Beremiz. So your LD program wouldn't work. > I think CODESYS v3 works the same and I do remember the same behavior > from working with some other PLC IDE a long time ago. > > > You could solve your problem if all assignments would be part of the same > network. > > Unfortunately this will not work in Beremiz, because now all > assignments are calculated separately, even inside the same network. > This is known bug and is already in our bug tracker. > > https://bitbucket.org/automforge/beremiz/issues/31/wrongstcodegeneration > process generated st code and he said he is going to port his solution to Beremiz/PLCOpenEditor. So we are waiting for that. ;) > > my best regards > > > > Thank you again for your time. > > > > Netza > > ________________________________ > > From: Andrey Skvortsov <[hidden email]> > > Sent: Wednesday, July 11, 2018 10:08 AM > > Cc: beremizdevel > > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > > > Hi Netza, > > > > in your new program the problem for not switching between E11 and E0 is the same as before. > > You reset E11 in first network and then check (already reset value) it in the last network. > > Therefore E0 is still false. > > I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD for your program. > > See attached program. > > > > BTW do clean program before packing it into archive. In this case archive will be very small > > and will no trigger mailing list message limit (150kb). > > > > >  > Best regards, > Andrey Skvortsov > >  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel signature.asc (849 bytes) Download Attachment 
Hello Andrey Skvortsov
Thank you a lot for your time, then you said that the PLC Equations can not be implemented because it is not on the Standard?.
with other problems, that I found is in the outputs when I use multiple outputs it can not be transfered to the outputs.
How can I solve it?.
Thank you
my best regards
Netza
From: Andrey Skvortsov <[hidden email]>
Sent: Monday, July 16, 2018 9:00 PM To: beremizdevel Subject: Re: [Beremizdevel] why the plc equation doesnot work? On 180716 23:32, Andrey Skvortsov wrote:
> On 180711 23:07, Netza Guadarrama wrote: > > Hello Andrey Skvortsov > > > > I appreciate a lot your suggestions and solutions, but the principal > > objective of this kind of implementation is to proof that the plc > > equations work. > > > The way how I made the equations is like this > > Estate = (Sum of all logic conditions that put on the state)(negated > > products of all logic conditions that put off the state) > > > This equation include the set or reset functions using just logic > > conditions is not needed to use explicit set or reset functions. > > > > But, I need to proof that the plc work with that equations. > > > > Thats way I need to use just logic functions as products and sums and negations only. > > > > But in the implementations as you said the logic variable change > > from true to false, but all the calculations with that variable > > before change are not finished, because there are a lot of equations > > that use that variable before change. May be I am wrong to think > > like that but we are in the logic process where first the logic need > > to be calculated before to put all the values on the outs. > > > In the implementation that I put now is using the fact that is > > falling the value from true to false because I think maybe I am > > wrong that the implementations of the plc logic is not ok. > > > I am confusing. > > I need help to understand the process on how is working the logic. > > The problem is that the networks are evaluated sequentially. > I've checked standard and couldn't found place where it's said that > every network should use values of variables at the moment of > beginning of current PLC cycle. > > Standard clearly says that all network evaluated sequencially from top > to bottom and next evaluation should started after previous evaluation > is done. > > I checked your problem in CODESYS v2 (see attached screenshot) and > behavior is the same as in Beremiz. So your LD program wouldn't work. > I think CODESYS v3 works the same and I do remember the same behavior > from working with some other PLC IDE a long time ago. > > > You could solve your problem if all assignments would be part of the same > network. > > Unfortunately this will not work in Beremiz, because now all > assignments are calculated separately, even inside the same network. > This is known bug and is already in our bug tracker. > > https://bitbucket.org/automforge/beremiz/issues/31/wrongstcodegeneration > BTW Thiago Alves solved this problem by writing some external tool that process generated st code and he said he is going to port his solution to Beremiz/PLCOpenEditor. So we are waiting for that. ;) > > my best regards > > > > Thank you again for your time. > > > > Netza > > ________________________________ > > From: Andrey Skvortsov <[hidden email]> > > Sent: Wednesday, July 11, 2018 10:08 AM > > Cc: beremizdevel > > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > > > Hi Netza, > > > > in your new program the problem for not switching between E11 and E0 is the same as before. > > You reset E11 in first network and then check (already reset value) it in the last network. > > Therefore E0 is still false. > > I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD for your program. > > See attached program. > > > > BTW do clean program before packing it into archive. In this case archive will be very small > > and will no trigger mailing list message limit (150kb). > > > > >  > Best regards, > Andrey Skvortsov > >  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel mymodbusarm3.tar.gz (28K) Download Attachment 
Hello Alexander Skvortsov
I found a PLC Equation implemented on one plc not Beremiz I want to show you in the picture, it mean that it need to be implemented too in Beremiz.
Then possible Beremiz has a problem.
What do you think?
my best regards
Netza
From: Netza Guadarrama <[hidden email]>
Sent: Monday, July 16, 2018 9:56 PM To: Andrey Skvortsov; beremizdevel Subject: Re: [Beremizdevel] why the plc equation doesnot work?
Hello Andrey Skvortsov
Thank you a lot for your time, then you said that the PLC Equations can not be implemented because it is not on the Standard?.
with other problems, that I found is in the outputs when I use multiple outputs it can not be transfered to the outputs.
How can I solve it?.
Thank you
my best regards
Netza
From: Andrey Skvortsov <[hidden email]>
Sent: Monday, July 16, 2018 9:00 PM To: beremizdevel Subject: Re: [Beremizdevel] why the plc equation doesnot work? On 180716 23:32, Andrey Skvortsov wrote:
> On 180711 23:07, Netza Guadarrama wrote: > > Hello Andrey Skvortsov > > > > I appreciate a lot your suggestions and solutions, but the principal > > objective of this kind of implementation is to proof that the plc > > equations work. > > > The way how I made the equations is like this > > Estate = (Sum of all logic conditions that put on the state)(negated > > products of all logic conditions that put off the state) > > > This equation include the set or reset functions using just logic > > conditions is not needed to use explicit set or reset functions. > > > > But, I need to proof that the plc work with that equations. > > > > Thats way I need to use just logic functions as products and sums and negations only. > > > > But in the implementations as you said the logic variable change > > from true to false, but all the calculations with that variable > > before change are not finished, because there are a lot of equations > > that use that variable before change. May be I am wrong to think > > like that but we are in the logic process where first the logic need > > to be calculated before to put all the values on the outs. > > > In the implementation that I put now is using the fact that is > > falling the value from true to false because I think maybe I am > > wrong that the implementations of the plc logic is not ok. > > > I am confusing. > > I need help to understand the process on how is working the logic. > > The problem is that the networks are evaluated sequentially. > I've checked standard and couldn't found place where it's said that > every network should use values of variables at the moment of > beginning of current PLC cycle. > > Standard clearly says that all network evaluated sequencially from top > to bottom and next evaluation should started after previous evaluation > is done. > > I checked your problem in CODESYS v2 (see attached screenshot) and > behavior is the same as in Beremiz. So your LD program wouldn't work. > I think CODESYS v3 works the same and I do remember the same behavior > from working with some other PLC IDE a long time ago. > > > You could solve your problem if all assignments would be part of the same > network. > > Unfortunately this will not work in Beremiz, because now all > assignments are calculated separately, even inside the same network. > This is known bug and is already in our bug tracker. > > https://bitbucket.org/automforge/beremiz/issues/31/wrongstcodegeneration > BTW Thiago Alves solved this problem by writing some external tool that process generated st code and he said he is going to port his solution to Beremiz/PLCOpenEditor. So we are waiting for that. ;) > > my best regards > > > > Thank you again for your time. > > > > Netza > > ________________________________ > > From: Andrey Skvortsov <[hidden email]> > > Sent: Wednesday, July 11, 2018 10:08 AM > > Cc: beremizdevel > > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > > > Hi Netza, > > > > in your new program the problem for not switching between E11 and E0 is the same as before. > > You reset E11 in first network and then check (already reset value) it in the last network. > > Therefore E0 is still false. > > I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD for your program. > > See attached program. > > > > BTW do clean program before packing it into archive. In this case archive will be very small > > and will no trigger mailing list message limit (150kb). > > > > >  > Best regards, > Andrey Skvortsov > >  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel Screenshot from 20180717 002928.png (398K) Download Attachment 
Administrator

Hi Netza,
On 180717 04:33, Netza Guadarrama wrote: > Hello Alexander Skvortsov BTW, my name is Andrey. ;) > I found a PLC Equation implemented on one plc not Beremiz I want to > show you in the picture, it mean that it need to be implemented too > in Beremiz. Could you tell me name of this PLC and vendor? > Then possible Beremiz has a problem. > > What do you think? I talked to my colleags who have much more experience with PLC from different vendors. I've used a lot of CODESYS (v2 and v3) PLC and some from other small vendors. In CODESYS v2 and v3 it's not possible to assign two different equations to two different coils in a single network. User have to use two networks in that case. So I was told that in Siemens it *is* possible to assign two different equations to two different coils in a single network. But it *highly* unrecommended to do! The recommended way is to use intermediate coils and several LD networks. If coils was set in one network, then following networks *always* use new value, like in Beremiz. Back to your example, you need only single intermediate coil in your program to make it work correctly. > > my best regards > > Netza > > > > ________________________________ > From: Netza Guadarrama <[hidden email]> > Sent: Monday, July 16, 2018 9:56 PM > To: Andrey Skvortsov; beremizdevel > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > Hello Andrey Skvortsov > > Thank you a lot for your time, then you said that the PLC Equations can not be implemented because it is not on the Standard?. > > with other problems, that I found is in the outputs when I use multiple outputs it can not be transfered to the outputs. > How can I solve it?. > > Thank you > > my best regards > > Netza > ________________________________ > From: Andrey Skvortsov <[hidden email]> > Sent: Monday, July 16, 2018 9:00 PM > To: beremizdevel > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > On 180716 23:32, Andrey Skvortsov wrote: > > On 180711 23:07, Netza Guadarrama wrote: > > > Hello Andrey Skvortsov > > > > > > I appreciate a lot your suggestions and solutions, but the principal > > > objective of this kind of implementation is to proof that the plc > > > equations work. > > > > > The way how I made the equations is like this > > > Estate = (Sum of all logic conditions that put on the state)(negated > > > products of all logic conditions that put off the state) > > > > > This equation include the set or reset functions using just logic > > > conditions is not needed to use explicit set or reset functions. > > > > > > > But, I need to proof that the plc work with that equations. > > > > > > Thats way I need to use just logic functions as products and sums and negations only. > > > > > > But in the implementations as you said the logic variable change > > > from true to false, but all the calculations with that variable > > > before change are not finished, because there are a lot of equations > > > that use that variable before change. May be I am wrong to think > > > like that but we are in the logic process where first the logic need > > > to be calculated before to put all the values on the outs. > > > > > In the implementation that I put now is using the fact that is > > > falling the value from true to false because I think maybe I am > > > wrong that the implementations of the plc logic is not ok. > > > > > I am confusing. > > > I need help to understand the process on how is working the logic. > > > > The problem is that the networks are evaluated sequentially. > > I've checked standard and couldn't found place where it's said that > > every network should use values of variables at the moment of > > beginning of current PLC cycle. > > > > Standard clearly says that all network evaluated sequencially from top > > to bottom and next evaluation should started after previous evaluation > > is done. > > > > I checked your problem in CODESYS v2 (see attached screenshot) and > > behavior is the same as in Beremiz. So your LD program wouldn't work. > > I think CODESYS v3 works the same and I do remember the same behavior > > from working with some other PLC IDE a long time ago. > > > > > > You could solve your problem if all assignments would be part of the same > > network. > > > > Unfortunately this will not work in Beremiz, because now all > > assignments are calculated separately, even inside the same network. > > This is known bug and is already in our bug tracker. > > > > https://bitbucket.org/automforge/beremiz/issues/31/wrongstcodegeneration > > > > BTW Thiago Alves solved this problem by writing some external tool that > process generated st code and he > said he is going to port his solution to Beremiz/PLCOpenEditor. So we > are waiting for that. ;) > > > > > my best regards > > > > > > Thank you again for your time. > > > > > > Netza > > > ________________________________ > > > From: Andrey Skvortsov <[hidden email]> > > > Sent: Wednesday, July 11, 2018 10:08 AM > > > Cc: beremizdevel > > > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > > > > > Hi Netza, > > > > > > in your new program the problem for not switching between E11 and E0 is the same as before. > > > You reset E11 in first network and then check (already reset value) it in the last network. > > > Therefore E0 is still false. > > > I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD for your program. > > > See attached program. > > > > > > BTW do clean program before packing it into archive. In this case archive will be very small > > > and will no trigger mailing list message limit (150kb). > > > > > > > > >  > > Best regards, > > Andrey Skvortsov > > > > > > > > > >  > Best regards, > Andrey Skvortsov > >  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel signature.asc (849 bytes) Download Attachment 
Hello Andrey Skvortsov, sorry I said last email the wrong name.
Here the book said that was using an Allen Brandley PLC, and the name of the book is Automation Manufacturing Systems with PLC's, Version 5.0, May 4, 2007. By Hugh Jack.
My best regards
Netza
From: Andrey Skvortsov <[hidden email]>
Sent: Tuesday, July 17, 2018 7:54 AM Cc: beremizdevel Subject: Re: [Beremizdevel] why the plc equation doesnot work? Hi Netza,
On 180717 04:33, Netza Guadarrama wrote: > Hello Alexander Skvortsov BTW, my name is Andrey. ;) > I found a PLC Equation implemented on one plc not Beremiz I want to > show you in the picture, it mean that it need to be implemented too > in Beremiz. Could you tell me name of this PLC and vendor? > Then possible Beremiz has a problem. > > What do you think? I talked to my colleags who have much more experience with PLC from different vendors. I've used a lot of CODESYS (v2 and v3) PLC and some from other small vendors. In CODESYS v2 and v3 it's not possible to assign two different equations to two different coils in a single network. User have to use two networks in that case. So I was told that in Siemens it *is* possible to assign two different equations to two different coils in a single network. But it *highly* unrecommended to do! The recommended way is to use intermediate coils and several LD networks. If coils was set in one network, then following networks *always* use new value, like in Beremiz. Back to your example, you need only single intermediate coil in your program to make it work correctly. > > my best regards > > Netza > > > > ________________________________ > From: Netza Guadarrama <[hidden email]> > Sent: Monday, July 16, 2018 9:56 PM > To: Andrey Skvortsov; beremizdevel > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > Hello Andrey Skvortsov > > Thank you a lot for your time, then you said that the PLC Equations can not be implemented because it is not on the Standard?. > > with other problems, that I found is in the outputs when I use multiple outputs it can not be transfered to the outputs. > How can I solve it?. > > Thank you > > my best regards > > Netza > ________________________________ > From: Andrey Skvortsov <[hidden email]> > Sent: Monday, July 16, 2018 9:00 PM > To: beremizdevel > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > On 180716 23:32, Andrey Skvortsov wrote: > > On 180711 23:07, Netza Guadarrama wrote: > > > Hello Andrey Skvortsov > > > > > > I appreciate a lot your suggestions and solutions, but the principal > > > objective of this kind of implementation is to proof that the plc > > > equations work. > > > > > The way how I made the equations is like this > > > Estate = (Sum of all logic conditions that put on the state)(negated > > > products of all logic conditions that put off the state) > > > > > This equation include the set or reset functions using just logic > > > conditions is not needed to use explicit set or reset functions. > > > > > > > But, I need to proof that the plc work with that equations. > > > > > > Thats way I need to use just logic functions as products and sums and negations only. > > > > > > But in the implementations as you said the logic variable change > > > from true to false, but all the calculations with that variable > > > before change are not finished, because there are a lot of equations > > > that use that variable before change. May be I am wrong to think > > > like that but we are in the logic process where first the logic need > > > to be calculated before to put all the values on the outs. > > > > > In the implementation that I put now is using the fact that is > > > falling the value from true to false because I think maybe I am > > > wrong that the implementations of the plc logic is not ok. > > > > > I am confusing. > > > I need help to understand the process on how is working the logic. > > > > The problem is that the networks are evaluated sequentially. > > I've checked standard and couldn't found place where it's said that > > every network should use values of variables at the moment of > > beginning of current PLC cycle. > > > > Standard clearly says that all network evaluated sequencially from top > > to bottom and next evaluation should started after previous evaluation > > is done. > > > > I checked your problem in CODESYS v2 (see attached screenshot) and > > behavior is the same as in Beremiz. So your LD program wouldn't work. > > I think CODESYS v3 works the same and I do remember the same behavior > > from working with some other PLC IDE a long time ago. > > > > > > You could solve your problem if all assignments would be part of the same > > network. > > > > Unfortunately this will not work in Beremiz, because now all > > assignments are calculated separately, even inside the same network. > > This is known bug and is already in our bug tracker. > > > > https://bitbucket.org/automforge/beremiz/issues/31/wrongstcodegeneration > > > > BTW Thiago Alves solved this problem by writing some external tool that > process generated st code and he > said he is going to port his solution to Beremiz/PLCOpenEditor. So we > are waiting for that. ;) > > > > > my best regards > > > > > > Thank you again for your time. > > > > > > Netza > > > ________________________________ > > > From: Andrey Skvortsov <[hidden email]> > > > Sent: Wednesday, July 11, 2018 10:08 AM > > > Cc: beremizdevel > > > Subject: Re: [Beremizdevel] why the plc equation doesnot work? > > > > > > Hi Netza, > > > > > > in your new program the problem for not switching between E11 and E0 is the same as before. > > > You reset E11 in first network and then check (already reset value) it in the last network. > > > Therefore E0 is still false. > > > I'd recommend you to use 'Set' and 'Reset' actions, if you want to use LD for your program. > > > See attached program. > > > > > > BTW do clean program before packing it into archive. In this case archive will be very small > > > and will no trigger mailing list message limit (150kb). > > > > > > > > >  > > Best regards, > > Andrey Skvortsov > > > > > > > > > >  > Best regards, > Andrey Skvortsov > >  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel Screenshot from 20180717 085112.png (558K) Download Attachment 
Administrator

In reply to this post by Netzahualcoyotl
On 180717 04:33, Netza Guadarrama wrote: > Hello Alexander Skvortsov > > I found a PLC Equation implemented on one plc not Beremiz I want to show you in the picture, it mean that it need to be implemented too in Beremiz. > > Then possible Beremiz has a problem. > > What do you think? Hi Netza, I've looked more carefully at your example from the book and I'd say that this code will work in Beremiz. Because they don't use reuse previously set coils in next coils. To avoid this intermediate coils (TA, TB, TC, TD, TE, TF) are used. They describe transitions for the next states and new states are evaluated in last three networks (ST1, ST2, ST3) based on previously calculated transitions. No problem here, IMHO. > > my best regards > Netza  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel signature.asc (849 bytes) Download Attachment 
Hello Andrey Skvortsov
Thank you the problem was solved that was the error is first calculate the transitions as you said, for the state machine.
I have just one problem in transferring values to the variables Angle1, Angle2, Angle3, Angle4.
I try some ways but I cant find how, can you please help me?
My best regards
Netza
From: Andrey Skvortsov <[hidden email]>
Sent: Tuesday, July 17, 2018 1:35 PM Cc: beremizdevel Subject: Re: [Beremizdevel] why the plc equation doesnot work? On 180717 04:33, Netza Guadarrama wrote: > Hello Alexander Skvortsov > > I found a PLC Equation implemented on one plc not Beremiz I want to show you in the picture, it mean that it need to be implemented too in Beremiz. > > Then possible Beremiz has a problem. > > What do you think? Hi Netza, I've looked more carefully at your example from the book and I'd say that this code will work in Beremiz. Because they don't use reuse previously set coils in next coils. To avoid this intermediate coils (TA, TB, TC, TD, TE, TF) are used. They describe transitions for the next states and new states are evaluated in last three networks (ST1, ST2, ST3) based on previously calculated transitions. No problem here, IMHO. > > my best regards > Netza  Best regards, Andrey Skvortsov  Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Beremizdevel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/beremizdevel mymodbusarm4.tar.gz (26K) Download Attachment 
Free forum by Nabble  Edit this page 