Motf CalFactor1
Sets the relationship between laser positioning bits to motion encoder counts. The units are galvo-command-bits per encoder-count. This value is applied to encoder input port MOTF 1 which affects tracing in the job Y axis.
Typically for linear MOTF operation, this value calculated by multiplying the linear resolution of the encoder (mm/count) by the scan head cal factor value (bits/mm) yielding the MOTF CalFactor1 (bits/count). The scan head cal factor can be referenced in the script by accessing the variable System.CalFactorY.
Syntax
| CalFactor1 = float value |
Value
| value | float | Calibration factor in galvo-command-bits per encoder-count. A negative number corresponds to a downward counting encoder when tracking forward motion. |
Return Values
| Return the calibration factor for the encoder. |
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.
-- 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")