Hello Guest it is April 16, 2024, 04:53:32 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.


Topics - manipul

Pages: 1
1
Mach4 Toolbox / Mach4: API "Gcode File" syntax error
« on: September 10, 2018, 05:11:58 AM »
Hi everyone,

I'm writing script in Mach4 to read a Gcode line for calculation, but function mcCntlGetGcodeLine, mcCntlGetGcodeLineCount appears "syntax error" when I compile, I tried to change the syntax but error still apear, Please help me fix this error, thank you.
My code:
       inst = mc.mcGetInstance()
       local int LineNumber = 5 --line number need to read
       local char Gcodeline[128]
       
Syntax No1:  mc.mcCntlGetGcodeLine(inst, LineNumber, Gcodeline, 128) --Get line number 5 from the Gocde file loaded into controller

or Syntax No2:   Gcodeline = mc.mcCntlGetGcodeLine(inst, LineNumber)

Pages: 1