Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D printing with UR10e
#11
(05 -11-2021, 07:14 AM)Kosiahn Wrote:
(05 -10-2021, 09:08 PM)Albert Wrote:Try changing the line that causes issues for this:


Code:
set_standard_digital_out(5, False)

Hello,
i changed this and all the other lines by hand and it works.
I wonder about this because there is code in the postprocessor that is supposed to solve this.

defsetDO(self,io_var,io_value):
"""Set a Digital Output"""
iftype(io_value) !=str:# set default variable value if io_value is a number
ifio_value>0:
io_value='True'
else:
io_value='False'

iftype(io_var) !=str:# set default variable name if io_var is a number
newline='set_standard_digital_out(%s,%s)'% (str(io_var),io_value)
else:
newline='%s=%s'% (io_var,io_value)

self.addline(newline)

Hello, I have found the mistake. This was in the code I have added from your manual page (//m.sinclairbody.com/doc/en/Robot-Machinin...rint3Dpost).

# Update the extruder speed when required
if self.PRINT_LAST_SIGNAL is Noneor abs(extruder_signal - self.PRINT_LAST_SIGNAL) > 1e-6:
self.PRINT_LAST_SIGNAL = extruder_signal
# Use the built-in setDO function to set an analog output
self.setDO(self.PRINT_E_AO,"%.3f" % extruder_signal)
# Alternatively, provoke a program call and handle the integration with the robot controller
#self.addline('ExtruderSpeed(%.3f)' % extruder_signal)

On the one hand, not the analog output is angesprocehn but the digital, I'll come back to that in a moment. When the digital output is called, the variable extruder_signal is converted to a string by "%.3f" and therefore falls through the query for a string in the "def set.DO" function.

More correctly it is therefore as follows
self.setDO(self.PRINT_E_AO, extruder_signal)

Now to the analog output this is defined as follows and must be reprogrammed.

def setAO(self, io_var, io_value):
"""Set an Analog Output"""
self.setDO(io_var, io_value)

Since in "def setDO" always a digital output is called, no analog output can be called here by this function, also the query for a string in this function is not needed for the analog output.


Messages In This Thread
3D printing with UR10e - bymehrbod- 05-23-2020, 01:12 PM
RE: 3D printing with UR10e - byAlbert- 05-25-2020, 09:54点
RE: 3D printing with UR10e - byJerome LC- 06-08-2020, 01:51 PM
RE: 3D printing with UR10e - byAlbert- 06-17-2020, 02:09 PM
RE: 3D printing with UR10e - bymehrbod- 07-03-2020, 11:50 AM
RE: 3D printing with UR10e - byKosiahn- 04-20-2021, 06:32 AM
RE: 3D printing with UR10e - byJeremy- 04-21-2021, 07:25 PM
RE: 3D printing with UR10e - byKosiahn- 05-10-2021, 02:05 PM
RE: 3D printing with UR10e - byAlbert- 05-10-2021, 09:08 PM
RE: 3D printing with UR10e - byKosiahn- 05-11-2021, 07:14有空
RE: 3D printing with UR10e - byKosiahn- 05-17-2021, 02:09 PM
RE: 3D printing with UR10e - byAlbert- 05-19-2021, 12:42 PM
RE: 3D printing with UR10e - byKosiahn- 06-04-2021, 12:20 PM
RE: 3D printing with UR10e - byKosiahn- 06-07-2021, 07:15 AM
RE: 3D printing with UR10e - byJeremy- 06-07-2021, 11:07 AM
RE: 3D printing with UR10e - byKosiahn- 06-09-2021, 07:49 AM



Users browsing this thread:
1 Guest(s)