Motf DelayCompensation
NOTE: This method is deprecated.
Sets a compensation value in usec for delays in MOTF system that exist between the triggering of a WaitForCount or WaitForDistance command and the beginning of actual lasing operations. Only needed for very precise high-speed MOTF operations.
Syntax
| DelayCompensation(int delay) |
Parameters
| delay | int | The delay in usec to be compensated. |
Copy
Example
-- This sample marks a series of circles spaced at a constant distance
SetUnits(Units.Millimeters)
-- Use MOTF Port 0
MOTF.Mode = Encoder.ExternalSingleAxis
-- Web direction
MOTF.Direction = Direction.BottomToTop
-- 10um linear resolution for example
encoderLinResInMmPerCount = 0.010
-- Bits/Mm * Mm/Count -> Bits/Count
MOTF.CalFactor1 = System.CalFactorY *
encoderLinResInMmPerCount
-- Initialize the MOTF settings
MOTF.Initialize()
-- Initialize laser/scan-head settings
Laser.MarkSpeed = 1000
Laser.MarkDelay = 200
Laser.JumpSpeed = 3000
Laser.JumpDelay = 200
Laser.Frequency = 20
Laser.DutyCycle1 = 50
Laser.Power = 50
Laser.LaserOnDelay = 75
Laser.LaserOffDelay = 125
Laser.PolyDelay = 50
Laser.VariPolyDelayFlag = true
-- Wait for this web travel before marking
partDistance = 50.
-- Compensate for 20usec of lag from the release of WaitForDistance
-- to when marking starts
MOTF.DelayCompensation(20)
-- Wait for start signal
IO.WaitForIo(Pin.Din.UserIn1,Trigger.Edge.Rising, 0, 0, true)
-- Initialize to wait the initial distance
MOTF.ResetTracking()
System.Flush()
-- Repeat until aborted via external signal
while IO.ReadPin(Pin.Din.UserIn4) == false do
MOTF.WaitForDistance(partDistance)
-- Counters are automatically reset when WaitForDistance() releases
MOTF.StartTracking(Tracking.WhileMarking)
Image.Circle(0, 0, 20)
MOTF.StopTrackingAndJump(0, 0, 0, 200)
Laser.WaitForEnd()
-- Counters are still counting and distance being measured
end
Report ("Job Finished")