Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

GetDI command not functioning

#1
Hi,

When I try to use the GetDI command on a techmanTM12. The command I am using is shown below.

robot.getDI (' 1 ')

When the software gets to this line of code, the robot starts making weird movements that are not in the software, and then the connection between the robot, and roboDK is lost.
When I comment this line of code, the software runs without a single problem.

Does anyone have a suggestion to tackle this problem?

Thanks in advance!
#2
Hi Jensa,

Can you update RoboDK and try again.
If it still doesn't work can you send me the .rdk station and the python code?

I have a TM here with me, I'll test it out.

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.


#3
Hi,

我们just added support for getting Digital Inputs via the API for Omron-Techman robots (on Windows installers).

Important: the digital input function returns the value to the corresponding modbus address. So you should provide the correct modbus address for your digital input.

I recommend you to update to the latest version of RoboDK. Also, make sure to connect to the physical connector that supports Modbus connection on the Omron-Techman controller (I think it is only one of the 3 connectors that supports it).

Albert
#4
(12-14-2020, 04:51 PM)Albert Wrote:Hi,

我们just added support for getting Digital Inputs via the API for Omron-Techman robots (on Windows installers).

Important: the digital input function returns the value to the corresponding modbus address. So you should provide the correct modbus address for your digital input.

I recommend you to update to the latest version of RoboDK. Also, make sure to connect to the physical connector that supports Modbus connection on the Omron-Techman controller (I think it is only one of the 3 connectors that supports it).

Albert

Hi Albert,

Thanks for your reply.
I updated to version 5.2 of RoboDK today and triend again. Also i entered the modbus address in my code.

robot.getDI(0000)

Now, this command returns an empty string, as shown in the screenshot. According to the documentation the connection to the robot is not working correctly.
Also I checked if the cable was connected to the correct port on the Omron-Techman controller.

Jens

(12-14-2020, 03:43 PM)Jeremy Wrote:Hi Jensa,

Can you update RoboDK and try again.
If it still doesn't work can you send me the .rdk station and the python code?

I have a TM here with me, I'll test it out.

Jeremy

Hi Jeremy,

I updated RoboDK to version 5.2 today. Also I used the modbus address in the command.

robot.getDI(0000)

Attached are the python software I used to test, and the RoboDK file.


Attached Files
.rdk input output test.rdk(Size: 796.69 KB / Downloads: 281)
.py input_test.py(Size: 744 bytes / Downloads: 344)
#5
Hi Jens,

Did you watch this video regarding TM robot:
https://youtu.be/buM1feEPiBE

I'll take a look later at what you did.
Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.


#6
Hi Jens,

Albert and I just ran a few tests and there were indeed a few bugs.
Some things were missing in your code and some were missing in ours.

我们should release a fixed version of RoboDK later today.

Your code should look a bit like this.

Code:
#Set Robot
robot = RDK.Item('TM12',ITEM_TYPE_ROBOT)

if robot.Connect():
print('connection ok')
else:
print('connection failed')


#collision checking
CHECK_COLLISIONS = False
RDK.setCollisionActive(COLLISION_ON if CHECK_COLLISIONS else COLLISION_OFF)

delay = 1 #delay in seconds

for i in range (0,11):
di = robot.getDI(i)
print(i, "input:", di)
time.sleep(delay)

Also, make sure the Listen Node is running on the controller.

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.






Users browsing this thread:
1 Guest(s)