![Sollae Systems PES-2403 Скачать руководство пользователя страница 25](http://html1.mh-extra.com/html/sollae-systems/pes-2403/pes-2403_user-manual_1316208025.webp)
PES-2403 User Manual > How to use > Lock and unlock
2017-07-28
Sollae Systems
page 25 of 26
Lock and unlock
The control lock is a kind of physical protection function. This function is to connect a limit switch to
the digital input port and disable further control if the switch is closed. Therefore, the operating
range of the stepper motor can be limited.
Control lock
If the operation of the motor is stopped by the limit switch, the motor status is locked and no
further control is possible until the lock is released.
Setting the control lock
Set the input mode of the digital input port referring to
Settings
chapter.
Unlock
A command unlock is for releasing the state of control lock.
When you execute the unlock command, the motor status changes from the locked state to the
stopped state and the input mode of the digital input port is reset to the normal input mode from
the control lock mode.
That means you can control the motor normally after executing unlock.
an example of control lock
<?php
include_once "/lib/sd_spc.php";
spc_reset();
spc_sync_baud(460800);
$sid = 1;
spc_request_dev($sid, "set vref stop 2");
spc_request_dev($sid, "set vref drive 8");
spc_request_dev($sid, "set vref lock 8");
spc_request_dev($sid, "set mode full");
spc_request_dev($sid, "eio set 0 mode lock");
spc_request_dev($sid, "eio set 1 mode lock");
spc_request_dev($sid, "eio set 2 mode lock");
spc_request_dev($sid, "eio set 3 mode lock");
spc_request_dev($sid, "move 4000 400 4000");
while((int)spc_request_dev($sid, "get state") > 1)
usleep(1);
// state: 0 - stop, 1 - locked