发布于 2010-06-03 13:28:31
1楼
以下是从英文文档里摘下来的,好像是可以从中断内发生脉冲。
1.11.3 Tracking tasks from higher priority classes (execution levels)
Depending on the application, it may be necessary to start motion control tasks (for example,
interrupt-controlled) in a higher priority class (execution level). Because the motion control
task cannot be tracked, or only inadequately tracked, in the higher priority class, the option
exists to perform tracking in the program cycle OB. For every start of the motion control task,
an instance data block that is not currently being utilized must be available. Refer to the
following flow chart to see how you start motion control tasks in a higher priority class
(for example, hardware interrupt OB) and continue tracking in the program cycle OB:
Depending on the frequency of the motion control tasks you want to start, you will have to
generate a sufficient number of instance data blocks. Users determine which instance data
block is used at the moment in the "DBx_used" tags.
Start of motion control task in the hardware interrupt OB
Binary queries of the "DBx_used" tags (orange) are used to find an instance data block
that is currently not in use. If such an instance data block is found, the motion control
task is started with this instance data block and the utilized instance data block is
marked as "used" (green).
Any other program sections of the hardware interrupt OB are then executed, followed by a
return to the program cycle OB.
I can do it