Motf DisableLaserRegulation

Disables laser regulation.

Syntax

DisableLaserRegulation()

 

Copy
Example
Text-- This sample images a square at equal spacing using Laser Regulation
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.CalFactor = System.CalFactorY *
encoderLinResInMmPerCount

-- Initialize the MOTF settings
MOTF.Initialize()

-- Initialize laser/scan-head settings
Laser.MarkSpeed = 5000
Laser.MarkDelay = 200
Laser.JumpSpeed = 10000
Laser.JumpDelay = 200
Laser.Frequency = 20
Laser.DutyCycle1 = 90
Laser.Power = 50
Laser.LaserOnDelay = 75
Laser.LaserOffDelay = 125
Laser.PolyDelay = 50
Laser.VariPolyDelayFlag = true

-- Initialize Laser Regulation
minWebSpeedInMmPerSec = 0
maxWebSpeedInMmPerSec = 500
laserPropertyScaleAtMinWebSpeedInPct = 10
laserPropertyScaleAtMaxWebSpeedInPct = 100

MOTF.EnableLaserRegulation(minWebSpeedInMmPerSec, maxWebSpeedInMmPerSec,
laserPropertyScaleAtMinWebSpeedInPct, laserPropertyScaleAtMaxWebSpeedInPct,
LaserRegMode.DutyCycle)

-- Wait for this web travel before marking
partDistance = 50.

-- Wait here for the 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.Box(-10, -10, 20, 20)
    MOTF.StopTrackingAndJump(0, 0, 0, 200)
    Laser.WaitForEnd()
    -- Counters are still counting and distance being measured
    -- The next two lines if uncommented are for diagnostics
    -- webSpeedInBitsPerMsec = IO.ReadPort(Port.Advanced.MOTFFrequency1)
    -- Report("Web speed in mm/sec: " .. (webSpeedInBitsPerMsec * 1000) / System.CalFactorY)
end

Report ("Job Finished")
-- Turn off laser reglation
MOTF.DisableLaserRegulation()