Difference between revisions of "Project Example: Flip Flop (Ladder Diagram)/zh-hans"

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_(Ladder_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映射。<br/>
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'Instance)来初始化softMC中的启动过程。<br/>
A rising edge detection will set the 'Done' variable (and also a global variable) and then call programs 'Axis1' and 'Axis2':
+
上升沿检测将设置'Done'变量(也是一个全局变量),然后调用程序'Axis1''Axis2':
  
 
[[File:FF main program.PNG|border|600px]]
 
[[File:FF main program.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.PNG|border|600px]]      [[File:FF Axis2.PNG|border|530px]]
 
[[File:FF Axis1.PNG|border|600px]]      [[File:FF Axis2.PNG|border|530px]]
 
<br/>
 
<br/>
 
<br/>
 
<br/>
  
==Visualization==
+
==可视化==
  
The program is controlled by a graphic interface:
+
程序由图形界面控制:
 
<br/>
 
<br/>
  
Line 43: Line 43:
 
<br/>
 
<br/>
 
<br/>
 
<br/>
When the startup process of softMC is done, the blue lamp is turned on.<br/>
+
当softMC的启动过程完成后,蓝灯亮起。<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.
+
用户可以通过每个功能的特殊按钮设置和复位两个驱动器的输出。 此外,'SR' FB的结果由绿色灯显示。

Latest revision as of 02:29, 16 July 2017

语言: 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'Instance)来初始化softMC中的启动过程。
上升沿检测将设置'Done'变量(也是一个全局变量),然后调用程序'Axis1'和'Axis2':

FF main program.PNG

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

可视化

程序由图形界面控制:

FF Visualization.PNG

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