I'm new to SFC programming and we're suppose to build the following simulation. I dont really understand how to build this, it's our first SFC project (first year mechatronics engineering student). This is the program we're suppose to build:
1. If lever "STOPP(bool;)" is true cylinder 1 shall go out until it reaches its peak point, then cylinder 2 and 3 shall go out. All the cylinders(bool;) should go inside if "STOPP" becomes false.
2. If lever "START(bool;)" is true cylinder 3 shall go out and stay out for 5 seconds. After that cylinder 1 and 2 shall go out. All cylinders should go inside when "START" is false regardless of their position.
3. If START is true while STOPP is true shall STOPP contuine to be valid until STOPP is false. Then every cylinder should go the whole way inside and after that the sequence for START should begin if START is true. The same conditions is applied for START if STOPP is true while START is true.
So far this is what I have;
Boolean variables for every cylinder (on/off), boolean variables for their position, boolean values for start and stopp.
We dont have a flow chart, therefore its really hard to understand what logic i should use. Does anyone know how to tackle this problem? We can use boolean operations as well with FBD.
(Note: Sorry for any wrongful translation, I'm directly translating the assignment text from Swedish to English).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, the main problem is "I don't really understand how to build this", especially because you are a student (but even if you were a technician, you are supposed to understand how to do a simple task like this).
For "how to do it", you do not have a flowchart, but have a description that is laid out as such. Try first to build one ;-) then try to translate it to a state machine such that a unique combination of outputs corresponds to every state.
The chart will have an Idle state, a Stop state chain and a Start state chain, that in the end will jump to Idle.
The rest is selecting the correct action qualifiers on the relevant states.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do you now how to make a command that understands the bransch part? I dont understand how to apply the bransch logic in SFC, like should I have 1 box for cylinder 1 and another for 2 and 3 (the first request)?
If I understand how to apply the logic I don't really need any help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hey,
I'm new to SFC programming and we're suppose to build the following simulation. I dont really understand how to build this, it's our first SFC project (first year mechatronics engineering student). This is the program we're suppose to build:
1. If lever "STOPP(bool;)" is true cylinder 1 shall go out until it reaches its peak point, then cylinder 2 and 3 shall go out. All the cylinders(bool;) should go inside if "STOPP" becomes false.
2. If lever "START(bool;)" is true cylinder 3 shall go out and stay out for 5 seconds. After that cylinder 1 and 2 shall go out. All cylinders should go inside when "START" is false regardless of their position.
3. If START is true while STOPP is true shall STOPP contuine to be valid until STOPP is false. Then every cylinder should go the whole way inside and after that the sequence for START should begin if START is true. The same conditions is applied for START if STOPP is true while START is true.
So far this is what I have;
Boolean variables for every cylinder (on/off), boolean variables for their position, boolean values for start and stopp.
We dont have a flow chart, therefore its really hard to understand what logic i should use. Does anyone know how to tackle this problem? We can use boolean operations as well with FBD.
(Note: Sorry for any wrongful translation, I'm directly translating the assignment text from Swedish to English).
Well, the main problem is "I don't really understand how to build this", especially because you are a student (but even if you were a technician, you are supposed to understand how to do a simple task like this).
For SFC, just read the documentation: in the help there is a entire section titled "Programming of applications" https://help.codesys.com/webapp/_cds_struct_application_programming;product=codesys;version=3.5.16.0, then there are countless tutorials and examples (in the guide there is also a SFC reference).
For "how to do it", you do not have a flowchart, but have a description that is laid out as such. Try first to build one ;-) then try to translate it to a state machine such that a unique combination of outputs corresponds to every state.
The chart will have an Idle state, a Stop state chain and a Start state chain, that in the end will jump to Idle.
The rest is selecting the correct action qualifiers on the relevant states.
Do you now how to make a command that understands the bransch part? I dont understand how to apply the bransch logic in SFC, like should I have 1 box for cylinder 1 and another for 2 and 3 (the first request)?
If I understand how to apply the logic I don't really need any help