New in version python: SDK-v2.0.5
Prototype | AxleSensorConfig(idCompany, idDevice, idSoftware, idBus) |
Description | End Sensor Configuration |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.35. Get End Sensor Configuration
New in version python: SDK-v2.0.5
Prototype | AxleSensorConfigGet() |
Description | Get end sensor configuration |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
11.36. End sensor activation
New in version python: SDK-v2.0.5
Prototype | AxleSensorActivate(actFlag) |
Description | End sensor activation |
Mandatory parameters | actFlag: 0-reset; 1-activate |
Default parameters | NULL |
Return Value |
|
11.37. End Sensor Register Write
New in version python: SDK-v2.0.5
Prototype | AxleSensorRegWrite(devAddr, regHAddr, regLAddr, regNum, data1, data2, isNoBlock) |
Description | End Sensor Register Write |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.38. End sensor code example
from fairino import Robot
import time
import threading
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
robot.AxleSensorConfig(18, 0, 0, 1)
error, company, type = robot.AxleSensorConfigGet()
print(f"company is:{company},type is:{type}")
rtn = robot.AxleSensorActivate(1)
print(f"AxleSensorActivate rtn is:{rtn}")
time.sleep(1)
rtn = robot.AxleSensorRegWrite(1, 4, 6, 1, 0, 0, 0)
print(f"AxleSensorRegWrite rtn is:{rtn}")
robot.CloseRPC()
11.39. Obtaining Robot Peripheral Protocols
New in version python: SDK-v2.0.3
Prototype | GetExDevProtocol() |
Description | Get robot peripheral protocol |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
11.40. Setting up robot peripheral protocols
New in version python: SDK-v2.0.3
Prototype | SetExDevProtocol(protocol) |
Description | Setting the robot peripheral protocol |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.41. Example of setup robot peripheral protocol code
from fairino import Robot
# Establish a connection with the robot controller and return a robot object if the connection is successful
robot = Robot.RPC('192.168.58.2')
protocol = 4096
rtn = robot.SetExDevProtocol(protocol)
print(f"SetExDevProtocol rtn:{rtn}")
rtn, protocol = robot.GetExDevProtocol()
print(f"GetExDevProtocol rtn:{rtn},protocol is:{protocol}")
robot.CloseRPC()
11.42. Getting end communication parameters
New in version python: SDK-v2.0.5
Prototype | GetAxleCommunicationParam() |
Description | |
Mandatory parameters | NULL |
Default parameters | NULL |
Return Value |
|
11.43. Setting the end communication parameters
New in version python: SDK-v2.0.5
Prototype | SetAxleCommunicationParam(baudRate, dataBit, stopBit, verify, timeout, timeoutTimes, period) |
description | set end communication parameters |
Required Parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |
11.44. Setting the end file transfer type
New in version python: SDK-v2.0.5
Prototype | SetAxleFileType(type) |
Description | Set the end file transfer type |
Mandatory parameters |
|
Default parameters | NULL |
Return Value | Error Code Success-0 Failure- errcode |