09-29-2018, 06:48 AM
(This post was last modified: 10-08-2018, 07:16 AM by hannsx.
Edit Reason: grammar
)
Hi,
I am using a PowerBrickLV in combination with a linear motor. The encoder resolution after 4xinterpolation is 50nm.
I move my Motor to the starting position for the move. Then I start the motion program:
-------------------------------------------------------------------------
open prog 2
rapid;
abs ;
Motor[1].JogTa = -0.01 :
Motor[1].JogTs = -0.01 ;
Motor[1].JogSpeed = ScanVelocityMs ;
while( StartScan == 0 ){ } ;
Y( ScanDestination ) ;
close
-------------------------------------------------------------------------
I thought it may be the faster way to get the move started after the StartScan bit is changed to 1, compared to querying the value in a PLC and starting the program from there. The reason why I think so ist that when I look at the program interrupts scheme, the motion program calculations start before the PLC - programs are run. Another reason is that, if the while-loop is iterated multiple times in the time slot allocated for the motion program calculations, the motion would start immediately if the StartScan value changed in the process of iterating. In a PLC on the other hand the StartScan would only prompt the starting of motion program 2 and the motion would then start on the following rti - interrupt.
Am I making the right assumptions here? If you know a faster way to start the motion please tell.
And I wonder if the while-loop is iterated multiple times in any real-time-interrupt, either in a motion program or a PLC.
Best regards,
hannsx
I am using a PowerBrickLV in combination with a linear motor. The encoder resolution after 4xinterpolation is 50nm.
I move my Motor to the starting position for the move. Then I start the motion program:
-------------------------------------------------------------------------
open prog 2
rapid;
abs ;
Motor[1].JogTa = -0.01 :
Motor[1].JogTs = -0.01 ;
Motor[1].JogSpeed = ScanVelocityMs ;
while( StartScan == 0 ){ } ;
Y( ScanDestination ) ;
close
-------------------------------------------------------------------------
I thought it may be the faster way to get the move started after the StartScan bit is changed to 1, compared to querying the value in a PLC and starting the program from there. The reason why I think so ist that when I look at the program interrupts scheme, the motion program calculations start before the PLC - programs are run. Another reason is that, if the while-loop is iterated multiple times in the time slot allocated for the motion program calculations, the motion would start immediately if the StartScan value changed in the process of iterating. In a PLC on the other hand the StartScan would only prompt the starting of motion program 2 and the motion would then start on the following rti - interrupt.
Am I making the right assumptions here? If you know a faster way to start the motion please tell.
And I wonder if the while-loop is iterated multiple times in any real-time-interrupt, either in a motion program or a PLC.
Best regards,
hannsx