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

RoboDK - I/O stops robot program (TM12)

#11
(11-10-2023, 05:11 AM)cathylee6905 Wrote:
(10-31-2023, 11:13 AM)Albert Wrote: I'm sorry for the delays, @Phillip will get in touch with you and we can setup a call if required.

For digital inputs and outpus to work with the driver you should use numbers instead of strings. Example:
Code:
_robot.setDO("0", "1")
Hi Phillip, I have noticed that the TM Robot's software (TM Flow) allows observation of the instant status of digital outputs for both the "Control box" and the "End Module." These outputs share the same names: DO 0, 1, 2, and 3. It appears that the setDO() command in the RoboDK API is linked to the digital output of the control box, and it can be set correctly.

However, my issue is that I would like to control the digital output of the "End Module," specifically the digital output at the robot flange for TM12, instead of the control box. What are the values associated with this port? Does RoboDK API support the I/O control of these ports?

On TM robot's the modbus IO's start at 800 for some reason, you can see a list in the robots documentation, also digital and analog IO have separated address spaces
https://www.tm-robot.com/wp-content/uplo...213_en.pdf
#12
Thanks Phillip. I go through the document quickly and try to set the end module digital output using the following command:
_robot.setDO("800", "1");

However, TMDriver returns an error and terminates the connection, showing that the input is limited by 255. The following is the message from the RoboDK log:
Modbus IO only allows 255 unique IO ports
Unexpected error: Traceback (most recent call last):
Unexpected error: File "C:/RoboDK/api/robot/TMDriver.py", line 29, in <module>
Unexpected error: RunMain()
Unexpected error: File "C:\RoboDK\api\robot\TMDriver.py", line 1094, in RunMain
Unexpected error: File "C:\RoboDK\api\robot\TMDriver.py", line 696, in RunDriver
Unexpected error: File "C:\RoboDK\api\robot\TMDriver.py", line 961, in RunCommand
Unexpected error: Exception: Modbus IO only allows 255 unique IO ports

Is there input values within 255 associated with these port for TM12 End module DO(800-802)?
#13
Hi sir, I need your help.
#14
My apologies for the delay.

You may be able to get around the problem by using a program call and having that program set an IO and then immediately return. For example, if the script needed to alter that digital output is:
Code:
modbus_write("TCP_1",0,"DO",800,1)
Then you could trigger this line by calling setParam:
Code:
robot.setParam("Driver",'c modbus_write("TCP_1",0,"DO",800,1)')

If it doesn't work, could you put in a request through our contact form:
https://robodk.com/contact

We can better help you and provide a custom version of the driver if needed.
  




Users browsing this thread:
1 Guest(s)