Difference between revisions of "Project Example: Flip Flop (Function Block Diagram)/zh-han"

From SoftMC-Wiki
Jump to: navigation, search
(Created page with "{{Languages}} The task's purpose is to set and reset an output. <br/> The main program initializes a startup process in the softMC. <br/> After the startup process is done, t...")
 
 
Line 1: Line 1:
{{Languages}}
+
{{Languages|Project_Example:_Flip_Flop_(Function_Block_Diagram)}}
The task's purpose is to set and reset an output. <br/>  
+
该任务的目的是设置和重置输出。<br/>  
The main program initializes a startup process in the softMC. <br/>
+
主程序在softMC中初始化启动过程。<br/>  
After the startup process is done, the program sets 'Done' variable and a global variable. <br/>
+
启动过程完成后,程序将设置'Done'变量和一个全局变量。<br/>  
After 'Done' variable is set, programs 'Axis1' and 'Axis2' are called. <br/>
+
设置'Done'变量后,调用'Axis1''Axis2'<br/>  
The application uses two drives and their outputs. <br/>
+
该应用程序使用两个驱动器及其输出。<br/>  
 
<br/>
 
<br/>
  
After installation of device description file (created by the Configurator) to Device Repository, the drive's address will be declared in the Axis Pool:
+
将设备描述文件(由Configurator创建)安装到设备存储库后,驱动器的地址将在Axis Pool中声明:
  
 
[[File:FF A1.PNG|border|600px]]          [[File:FF A2.PNG|border|600px]]
 
[[File:FF A1.PNG|border|600px]]          [[File:FF A2.PNG|border|600px]]
Line 13: Line 13:
 
<br/>
 
<br/>
  
In the EtherCAT Slaves section, we can find the I/O mapping for each device.<br/>
+
在EtherCAT从站部分,我们可以找到每个设备的I / O映射。
In the picture below Input1, Input2, Output1, Output5 are declared as new variables (can also be mapped as existing variables):
+
在下图中Input1,Input2,Output1,Output5被声明为新变量(也可以映射为现有变量):
  
 
[[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. <br/>
+
主程序使用'softMC_Startup'FB('mc_st'实例)来初始化softMC中的启动过程。<br/>
A rising edge detection will set the 'Done' variable (and also a global variable) and then call programs 'Axis1' and 'Axis2':
+
当进程完成后,全局变量将被设置为TRUE。 之后,调用'Axis1''Axis2'程序。:
  
 
[[File:FF main program FBD.PNG|border|600px]]
 
[[File:FF main program FBD.PNG|border|600px]]
Line 27: Line 27:
 
<br/>
 
<br/>
  
When programs 'Axis1' and 'Axis2' are called, output5 is turned on.<br/>
+
当程序'Axis1''Axis2'被调用时,output5被打开。<br/>
If output5 is turned on, the 'SR' FB is enabled with output1 as 'Q1' ('SR_0' Instance). <br/>
+
如果output5打开,则'SR'FB使能,输出1为'Q1''SR_0'Instance)。<br/>
Input1 will trigger the 'set' function and input2 will trigger the 'reset' function.<br/>
+
Input1将触发'set'功能,input2将触发'reset'功能。<br/>
Programs 'Axis1' and 'Axis2' are similar:<br/>
+
程序'Axis1''Axis2'类似:<br/>
 
[[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/>
Line 36: Line 36:
  
  
==Visualization==
+
==可视化==
  
The program is controlled by a graphic interface:
+
程序由图形界面控制:
 
<br/>
 
<br/>
  
Line 44: Line 44:
 
<br/>
 
<br/>
 
<br/>
 
<br/>
When the startup process of softMC is done, the blue lamp is turned on.<br/>
+
当softMC的启动过程完成后,蓝灯亮起。
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.
+
用户可以通过每个功能的特殊按钮设置和复位两个驱动器的输出。 此外,'SR' FB的结果由绿色灯显示。

Latest revision as of 03:41, 16 July 2017

Language: English

该任务的目的是设置和重置输出。
主程序在softMC中初始化启动过程。
启动过程完成后,程序将设置'Done'变量和一个全局变量。
设置'Done'变量后,调用'Axis1'和'Axis2'。
该应用程序使用两个驱动器及其输出。

将设备描述文件(由Configurator创建)安装到设备存储库后,驱动器的地址将在Axis Pool中声明:

FF A1.PNG FF A2.PNG

在EtherCAT从站部分,我们可以找到每个设备的I / O映射。 在下图中Input1,Input2,Output1,Output5被声明为新变量(也可以映射为现有变量):

FF CDHD I O.PNG

主程序使用'softMC_Startup'FB('mc_st'实例)来初始化softMC中的启动过程。
当进程完成后,全局变量将被设置为TRUE。 之后,调用'Axis1'和'Axis2'程序。:

FF main program FBD.PNG

当程序'Axis1'和'Axis2'被调用时,output5被打开。
如果output5打开,则'SR'FB使能,输出1为'Q1'('SR_0'Instance)。
Input1将触发'set'功能,input2将触发'reset'功能。
程序'Axis1'和'Axis2'类似:
FF Axis1 FBD.PNG FF Axis2 FBD.PNG


可视化

程序由图形界面控制:

FF Visualization.PNG

当softMC的启动过程完成后,蓝灯亮起。 用户可以通过每个功能的特殊按钮设置和复位两个驱动器的输出。 此外,'SR' FB的结果由绿色灯显示。