Hello Guest it is October 02, 2023, 08:40:05 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - djmickyg

Pages: 1
General Mach Discussion / Re: Mach3: Expose APIs from Mach4.Document
« on: August 17, 2020, 07:55:18 PM »
I can run MachRemote now, but I don't know which APIs or commands I can use ?? From source code of MachRemote, I can find

hi kccheng, did you ever find a list of usable functions?
i'm creating a python connector, I've got the following functions to work. I cant get doOEMbutton or GetOEMLed to work.

SetFRO(100) #feedrate override, send percent

Thanks! I'll give these a shot

I want to be able to capture images from the USB microscope. I will be moving the axes by small increments and taking a bunch of photos which i will later stitch together.
I havent been able to find a plug in that does this. I've come up with something of my own using CommandCam, my script is creating a .bat file which is creating a unique name for each image based on date_time_xyz pos, i am then running the bat files.

it's working, sort of, but i have a few issues.
I've set it to M2000

  • first issue is the script isn't waiting for the bat file to finish executing, i saw somewhere in the vb script manual about a wait but i can't remember where it was
  • second issue, when i load the gcode into MAch3 with the M2000 command, MACH3 obviously runs through the code to check for errors, when it runs through any gcode with M2000 it will run the bat files. if there a way I can get the script to only run when cycle start and not when checking for errors on load??

here is a code, this is in a file called M2000.m1s

Code: [Select]
Rem VBScript To capture image To file from camera

Rem date = Date()
x_current = "x" + CStr(GetUserDRO(0))
y_current = "y" + CStr(GetUserDRO(1))
z_current = "z" + CStr(GetUserDRO(2))
date_now = Date()
time_now = Time(Now)
date_string = CStr(Year(date_now)) + CStr(Month(date_now)) + CStr(Day(date_now))
time_string = CStr(Hour(time_now )) + "-" + CStr(Minute(time_now )) + "-" + CStr(Second(time_now ))

output_dir = "c:\cnc_cam\"
file_name =  x_current + "_" + y_current + "_" + z_current + ".bmp"

output_file = "CommandCam.bat"

Open output_file For Output As #1
Print #1, "cd " + output_dir
Print #1, "CommandCam /quiet /delay 100 /filename " + date_string + "_" + time_string + "_" + file_name
Close #1

Shell ( "CommandCam.bat") 


G-Code, CAD, and CAM discussions / system command from gcode?
« on: September 23, 2018, 03:51:49 AM »
does mach3 have the ability to call a windows system command (i.e cmd command) from a line in the gcode?

Pages: 1