Difference between revisions of "Project Example: Flip Flop (Function Block Diagram)"
Noam.nitzan (talk | contribs) |
|||
(5 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | + | {{Languages|Project_Example:_Flip_Flop_(Function_Block_Diagram)}} | |
The task's purpose is to set and reset an output. <br/> | The task's purpose is to set and reset an output. <br/> | ||
The main program initializes a startup process in the softMC. <br/> | The main program initializes a startup process in the softMC. <br/> | ||
Line 13: | Line 13: | ||
<br/> | <br/> | ||
− | In the EtherCAT Slaves section, we can find the I/O mapping for each device. | + | In the EtherCAT Slaves section, we can find the I/O mapping for each device.<br/> |
− | In the picture below | + | In the picture below Input1, Input2, Output1, Output5 are declared as new variables (can also be mapped as existing variables): |
[[File:FF CDHD I_O.PNG|border|600px]] | [[File:FF CDHD I_O.PNG|border|600px]] | ||
Line 20: | Line 20: | ||
<br/> | <br/> | ||
− | The main program uses 'softMC_Startup' FB ('mc_st' Instance) to initialize a startup process in the softMC. A rising edge detection will set the 'Done' variable (and also a global variable) | + | The main program uses 'softMC_Startup' FB ('mc_st' Instance) to initialize a startup process in the softMC. <br/> |
+ | A rising edge detection will set the 'Done' variable (and also a global variable) and then call programs 'Axis1' and 'Axis2': | ||
[[File:FF main program FBD.PNG|border|600px]] | [[File:FF main program FBD.PNG|border|600px]] | ||
Line 32: | Line 33: | ||
[[File:FF Axis1 FBD.PNG|border|400px]] [[File:FF Axis2 FBD.PNG|border|390px]] | [[File:FF Axis1 FBD.PNG|border|400px]] [[File:FF Axis2 FBD.PNG|border|390px]] | ||
<br/> | <br/> | ||
+ | <br/> | ||
+ | |||
+ | |||
+ | ==Visualization== | ||
+ | |||
+ | The program is controlled by a graphic interface: | ||
+ | <br/> | ||
+ | |||
+ | [[File:FF Visualization.PNG|border|600px]] | ||
+ | <br/> | ||
+ | <br/> | ||
+ | When the startup process of softMC is done, the blue lamp is turned on.<br/> | ||
+ | The user can set and reset the outputs of the two drives with special buttons for each function. In addition, the result of the 'SR' FB is shown by the green lamps. |
Latest revision as of 03:36, 16 July 2017
Language: | English |
---|
The task's purpose is to set and reset an output.
The main program initializes a startup process in the softMC.
After the startup process is done, the program sets 'Done' variable and a global variable.
After 'Done' variable is set, programs 'Axis1' and 'Axis2' are called.
The application uses two drives and their outputs.
After installation of device description file (created by the Configurator) to Device Repository, the drive's address will be declared in the Axis Pool:
In the EtherCAT Slaves section, we can find the I/O mapping for each device.
In the picture below Input1, Input2, Output1, Output5 are declared as new variables (can also be mapped as existing variables):
The main program uses 'softMC_Startup' FB ('mc_st' Instance) to initialize a startup process in the softMC.
A rising edge detection will set the 'Done' variable (and also a global variable) and then call programs 'Axis1' and 'Axis2':
When programs 'Axis1' and 'Axis2' are called, output5 is turned on.
If output5 is turned on, the 'SR' FB is enabled with output1 as 'Q1' ('SR_0' Instance).
Input1 will trigger the 'set' function and input2 will trigger the 'reset' function.
Programs 'Axis1' and 'Axis2' are similar:
Visualization
The program is controlled by a graphic interface:
When the startup process of softMC is done, the blue lamp is turned on.
The user can set and reset the outputs of the two drives with special buttons for each function. In addition, the result of the 'SR' FB is shown by the green lamps.