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

Program Event or Function Call for 3D Printing Extruder Control

#2
Hi Patrick,

The post processor and the driver are different (having a working post processor does not mean the driver will work).

The best way to make this work with the driver is to trigger a program with a number. For example:
Extruder(73)
will pass the program id 73. However, this was designed to make it work for more simple calls (program ID). Example:
Program 1
This will pass the program_id number 1. You can pass a floating point number (32 bit precision, more informationhere).

Note that it is not possible to trigger programs by name using this method. You are also limited to 1 value. We can improve it to pass 2 or 3 values if you need.

Once you pass the program id (as an integer or a decimal value) you need to implement your actions in the driver (SRC file). I attached the sample implementation code and comments in the driver file.

Code:
;----- Run program COM_VALUE1 ---------
;(to trigger from RoboDK: use robot.RunCodeCustom("program id", INSTRUCTION_CALL_PROGRAM)
program_id = COM_VALUE1
SWITCH program_id
CASE 1
;-- run program 1 --
;钻()
;-------------------
CASE 2
;-- run program 2 --
;Cut()
;-------------------
ENDSWITCH


Albert


Messages In This Thread
RE: Program Event or Function Call for 3D Printing Extruder Control - byAlbert- 01-13-2020, 12:08 AM



Users browsing this thread:
1 Guest(s)