top of page

Python 11.34. End Sensor Configuration

New in version python: SDK-v2.0.5

Prototype

AxleSensorConfig(idCompany, idDevice, idSoftware, idBus)

Description

End Sensor Configuration

Mandatory parameters

  • idCompany: manufacturer, 18-Junkong; 25-Huide

  • idDevice: type, 0-JUNKONG/RYR6T.V1.0

  • idSoftware: software version, 0-J1.0/HuiDe1.0 (not yet available)

  • idBus: mount location, 1-end port 1; 2-end port 2… ..8-end port 8 (not open yet)

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

  • errorcode Success-0 Failure- errcode

  • idCompany: manufacturer, 18-Junkong; 25-Huide

  • idDevice: type, 0-JUNKONG/RYR6T.V1.0

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

  • errorcode Success-0 Failure- errcode

  • coord: coordinate system values [x,y,z,rx,ry,rz]

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

  • devAddr: device address number 0-255

  • regHAddr: register address high 8 bits

  • regLAddr: register address lower 8 bits

  • regNum: number of registers 0-255

  • data1: write to register value 1

  • data2: write register value 2

  • isNoBlock: whether blocking 0 - blocking; 1 - non-blocking

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(18001)
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(1461000)
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

  • errorcode Success-0 Failure- errcode.

  • protocol: Robot peripheral protocol number 4096-Extended Axis Control Card; 4097-ModbusSlave; 4098-ModbusMaster

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

  • protocol: robot peripheral protocol number 4096 - Extended Axis Control Card; 4097 - ModbusSlave; 4098 - ModbusMaster

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

Get end communication parameters

Mandatory parameters

NULL

Default parameters

NULL

Return Value

  • errorcode Success-0 Failure- errcode

  • baudRate: baud rate: support 1-9600, 2-14400, 3-19200, 4-38400, 5-56000, 6-67600, 7-115200, 8-128000

  • dataBit: data bit: data bit support (8,9), currently commonly used 8

  • stopBit: stop bit: 1-1, 2-0.5, 3-2, 4-1.5, currently 1 is commonly used.

  • verify: check digit: 0-None, 1-Odd, 2-Even, currently 0.

  • timeout: timeout time: 1~1000ms, this value needs to be combined with the peripheral with the setting of reasonable time parameters

  • timeoutTimes: timeout times: 1~10, mainly for timeout retransmission, reduce occasional exceptions to improve user experience

  • period: periodic instruction time interval:1~1000ms, mainly used for the time interval between each issuance of periodic instructions

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

  • baudRate: baud rate: supports 1-9600, 2-14400, 3-19200, 4-38400, 5-56000, 6-67600, 7-115200, 8-128000

  • dataBit: data bit: data bit support (8,9), currently commonly used 8

  • stopBit: stop bit: 1-1, 2-0.5, 3-2, 4-1.5, currently 1 is commonly used.

  • verify: check digit: 0-None, 1-Odd, 2-Even, currently 0.

  • timeout: timeout time: 1~1000ms, this value needs to be combined with the peripheral with the setting of reasonable time parameters

  • timeoutTimes: timeout times: 1~10, mainly for timeout retransmission, reduce occasional exceptions to improve user experience

  • period: periodic instruction time interval:1~1000ms, mainly used for the time interval between each issuance of periodic instructions

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

  • type: 1-MCU upgrade file, 2-LUA file

Default parameters

NULL

Return Value

Error Code Success-0 Failure- errcode


robotic arm
FAIRINO ROBOTIC ARMS

Contact

Location: 10637 Scripps Summit Court,

San Diego, CA. 92131
Phone: (619) 333-FAIR
Email: hello@fairino.us

© 2023 Fairino US official site Proudly created By G2T

bottom of page