Installing External Libraries in XArm Studio

Hello!

I was wondering if I could install external libraries in XArm Studio Python IDE?

Hi Edwinard,

It is not supported for now. What libs do you want to install?

im currently looking to install openOPC to the xarm python ide as i want to connect the robot to kepserver

Hi Edwinard,

Do you connect xarm to the Kepserver in other python IDE like pycharm successfully?

Hello, sorry for the late reply, yes i have managed to connect the xarm to the kepserver successfully in the other python IDE

Hi Edwinard,

You have completed all communication with kepserver through other python IDEs, the only problem is that it cannot be set as an offline task, right?
We still want to know your application, do you use PLC? And PLC must be considered as a master in your application?
If you want to use Modbus RTU, actually our xArm robot must be the master.

Best regards,
Minna

Hi Minna,

Yes correct I can’t set as an offline task.

Also No to using the PLC. Our goal is to actually to connect the XArm to a Computer, then the Computer will be connected to a software called “Kepserver”.

The idea is that we would like to run the XArm using Blockly so we could use it as an offline task but we would also like the XArm to transmit the data of the joint angles, speed, error message, etc to the kepserver. But from my testing i was not able to get the data out if i did not use the external python IDEs, is there a way for me to get the data (joint angles, speed, etc) into the kepserver by reading the addresses with those values inside of the Control box?

*Edit: I just saw your reply from one of my other questions, to clarify the robot can be the master but we would like to read the data (speed, angles, etc) off the robot

Sincerely,
Edwinard

Hi Edwinard,

Thanks for the details. You can get the data(joint angles, speed etc) on our python IDEs easily with python codes, the problem is you must use openOPC to build the connection with kepserver.
We think it is risky to install the third-party libs into our internal python IDEs in the control box. Why not use external python IDEs directly as there is indeed a computer in your scenario?

Best regards,
Minna

The goal for our project is to run the robot without the computer, just by using the control box. Hence why i’m trying to get the data out from the control box without using an external IDE. Is it possible for me to read the registers/addresses inside of the control box directly using Modbus TCP/IP?

For context (example) on some other devices like a PLC, we could read the exact IO data based off reading the address of the PLC using just the Modbus protocol. So I was wondering if its possible for me to do the same with the XArms control box?

*to clarify, yes we will have a computer connected to the robot but this computer is only to display other information from the kepserver, so nothing will be running on it except the information display hence why the xarm has to be controlled from the control box. The data from the XArm will also be taken from this computer but the difficulty is that we cant seem to get the data out from XArm

Sincerely,
Edwinard

Hello Minna, an additional question, inside the developer manual there was this stated inside of it. How exactly do I “prepare a Modbus messages”? what software do I use to send these Modbus messages

image

Hi Edwinard,

Is it possible for me to read the register/addresses inside of the control box directly using Modbus TCP/IP?
—Yes, you can use 30003,30002 port to get the data, have you tried it?
Here is the example.
xArm-Python-SDK/get_report_data_with_protocol.py at master ¡ xArm-Developer/xArm-Python-SDK ¡ GitHub

Best regards,
Minna

1 Like

Edwinard,

Actually we are using custom tcp protocol for communication, ‘modbus messages’ means you need to send our custom command according to developer manual.

For example, if you want to get the position of xArm, you can send ‘00 01 00 02 00 01 29’. Any tool that supports TCP can be used.

1 Like

Hi Minna,

Additional question, is there a way i can read a certain register using modbus tcp/ip. i want for example to read the register of parameter 1, which register can i call. i need a specific register instead of requesting for a response as the software which im using cannot send request but can read modbus registers. For example on another application i could read address 400001 and would get data back from that address. how could i do the same with xarm?

Sincerely,
Edwinard

Hi Edwinard,

Currently, it is not supported to read the data of the register directly, you can parse the reported data to obtain the value of the register. Do you obtain the reported data by 30001/30002/30003 port successfully?