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

Program Event or Function Call for 3D Printing Extruder Control

#11
Hello Patrick!

Thank you very butch for sharing your workflow anf scripts for CS8 controller.
我有类似的模型(CS8C TX60机器人),can not deal with MoveL commands and RunOnRobot mode at same time. The MoveL working good while I upload to robot, but when I run on robot, gives me an error (soflimit reached). The MoveJ command just working good.
How did you deal with this situation? I tried all posts and I have installed HSM Machining on SC8C so I tried the machining post as well. All of them working the same - giving me fault at MoveL.

Bests,
Eduard
#12
Hi !!
Please help I put the program in the postprocessor

Code:
def ekstruder():

# This script shows an example to integrate an extruder with RoboDK
# We need to add this script to the RoboDK project ot trigger sending the E value (Extruder parameter)
# This script meant to work when we are running 3D printing with the driver ("Run on robot" option)

# Send the E_Value over Ethernet (ASCII numbers)
EXTRUDER_IP = '192.168.1.15' # The IP of the extruder
EXTRUDER_PORT = 100 # The same port as used by the Extruder server

E_Value = None

import sys
if len(sys.argv) > 1:
E_Value = float(sys.argv[1])


# Implement socket communication to send the E_Value over Ethernet/socket
import socket
BUFFER_SIZE = 1024

# Build the byte array to send
bytes2send = bytes(str(E_Value) + '\0', 'ascii')

print("Sending: " + str(bytes2send))
print("Connecting to %s:%i" % (EXTRUDER_IP, EXTRUDER_PORT))

# Connect to the extruder and send byte array
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((EXTRUDER_IP, EXTRUDER_PORT))
s.send(bytes2send)
s.close()

The program connects to the printer and sends the G-code I'll capture the extruder value

Code:
if code.startswith("Extruder("):

# Intercept the extruder command.
# if the program call is Extruder(123.56)
# we extract the number as a string
# and convert it to a number

self.PRINT_E_NEW = float(code[9:-1])

sys.argv = str(self.PRINT_E_NEW)

self.uruchom_ekstruder() ?????? !!!!!!!!!!!!!!!!!!!!!!
return
else:
self.addline(code + "()")

How to call extruder () functions ??
The robot reports an error Am I doing it right?
Thank you and greetings

#13
Code:
import sys
if len(sys.argv) > 1:
E_Value = float(sys.argv[1])

code_E = 'G1 E ' + str(E_Value)

f_value = None

#检查如果我们anot内部运行此程序her program and passing arguments
import sys
if len(sys.argv) > 1:

f_value = float(sys.argv[2])

if f_value is None :
f_value = 0

f_transform = f_value * 60 * 1.5676 # mm/s in mm/min und adaptation for line crossection Q to fed filament Q/pi*(2.85/2)²

code_f = ' G2 F' + str(f_value)

The script reports an error
How to output information about the variable extruder speed and the amount of filament


Attached Files Thumbnail(s)

#14
How do I assign the SPEED_MS variable to sys.argv [2] ??
Self.PRINT_E_NEW is assigned to sys.argv [1]
I want to read these two variables with sparks

Code:
import sys
if len(sys.argv) > 1:

E_Value = float(sys.argv[1])

Code:
mport sys
if len(sys.argv) > 2:
e_value = float(sys.argv[2])

if f_value is None :
f_value = 0

I can't pass SPEED_MS to extuder speed I want to send two parameters, speed and quantity of filamant

Thank you
#15
Hello, it seems like you have resolved your issue.

I would like to ask you about our 6-axis FANUC robot. I encountered a problem where the robot doesn't move when I use the command robot.RunInstruction('RMACRO2', INSTRUCTION_CALL_PROGRAM). I suspect that it might be related to my online programming.

Our workflow involves using the arm through the FANUC robot's vision system for tasks such as gripping and grinding. The process is as follows:

Computer > ROBODK > FANUC robot > FANUC internal vision program > ROBODK control

Could you please provide any suggestions or insights on why the RMACRO2 instruction is not working for me?
#16
I just got back to you on this question on your post from another thread:
//www.sinclairbody.com/forum/Thread-Script-c...anuc-robot

Please try to not duplicate questions. You can also create new threads for new questions.




Users browsing this thread:
1 Guest(s)