5.1. Setting the control box digital output
prototype | SetDO(id, status, smooth=0, block=0) |
Description | Setting the control box digital outputs |
Mandatory parameters |
|
Default Parameters |
|
Return Value | Error Code Success-0 Failure- errcode |
5.2. Setting Tool Digital Outputs
prototype | SetToolDO (id, status, smooth=0, block=0) |
Description | Setting the digital output of the tool |
Mandatory parameters |
|
Default Parameters |
|
Return Value | Error Code Success-0 Failure- errcode |
5.3. Setting the control box analog output
Prototype | SetAO(id,value,block=0) |
Description | Setting the control box analog output |
Mandatory parameters |
|
Default parameters |
|
Return Value | Error Code Success-0 Failure- errcode |
5.4. Setting Tool Analog Outputs
Prototype | SetToolAO(id,value,block=0) |
Description | Setup Tool Analog Output |
Mandatory parameters |
|
Default parameters |
|
Return Value | Error Code Success-0 Failure- errcode |
5.5. Set digital, analog output code example
from fairino import Robot
import time
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
status = 1
smooth = 0
block = 0
for i in range(16):
robot.SetDO(i, status, smooth, block)
time.sleep(0.3)
status = 0
for i in range(16):
robot.SetDO(i, status, smooth, block)
time.sleep(0.3)
status = 1
for i in range(2):
robot.SetToolDO(i, status, smooth, block)
time.sleep(1)
status = 0
for i in range(2):
robot.SetToolDO(i, status, smooth, block)
time.sleep(1)
for i in range(100):
robot.SetAO(0, i, block)
time.sleep(0.03)
for i in range(100):
robot.SetToolAO(0, i, block)
time.sleep(0.03)
robot.CloseRPC()
5.6. Getting control box digital inputs
prototype | GetDI(id, block=0) |
Description | Get control box digital inputs |
Mandatory parameters |
|
Default Parameters |
|
Return Value |
|
5.7. Get Tool Digital Inputs
prototype | GetToolDI(id, block=0) |
Description | Get Tool Digital Inputs |
Mandatory parameters |
|
Default Parameters |
|
Return Value | Error Code Success-0 Failure- errcode - di: 0 - low level, 1 - high level |
5.8. Getting Control Box Analog Inputs
Prototype | GetAI(id, block = 0) |
Description | Get control box analog inputs |
Mandatory parameters |
|
Default Parameters |
|
Return Value |
|
5.9. Get Tool Analog Inputs
Prototype | GetToolAI (id, block = 0) |
Description | Get end analog input |
Mandatory parameters |
|
Default Parameters |
|
Return Value |
|
5.10. Obtain the status of the button for recording the end point of the robot
Prototype | GetAxlePointRecordBtnState() |
Description | Obtain the status of the button for recording the end point of the robot |
Mandatory parameters | NULL |
Default Parameters | NULL |
Return Value |
|