Hello Guest it is March 28, 2024, 02:24:09 PM

Author Topic: Comments about Mach4 in Demo  (Read 93501 times)

0 Members and 1 Guest are viewing this topic.

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #170 on: May 04, 2014, 02:37:15 AM »
Thanks!  I'll look at that switch.  But if you are using a RS232 port, it doesn't make any difference.  The switch is there to make those RS232 to RS485 converters work... well...  better.  I still am not convinced that any RS232 to RS485 adapters is going to be a real solid solution.  But that is basically what that switch does.  It needs to be fixed.  Just don't let it stop you from using it with a RS232 port.

Steve

The 'com' port is virtual. Set up by a driver. The physical connection is thru USB. This has been working fine with MACH3 for a long time. In MACH4, I can get a 'Modbus 0 OK' on the diagnostic, but every function shows an 'Illegal Argument Error' so I don't know if There is actual communication there or not.

Absent documentation, I'm not getting anywhere fast. Is it possible to describe briefly how to get data on and off the Modbus? I saw some mc.********* functions having something to do with MACH Registers, but again, no idea if that it the correct path.

I'm on board with converting all of the macros to Lua, and for me, the multi line MIDI alone justifies the $200 price tag of MACH4, but I will need to get the Modbus working because my 4th axis motor controller uses it extensively. I think I read somewhere that Brains are gone and the example Modbus functions imply that bitwise operation is fixed in MACH4. The Modbus plug-in is slick, but individual registers cannot be passed and Brain cant pass floats and so on. Modbus on MACH3 is basically a collection of workarounds, so I am anxious to see the MACH4 implementation. 
« Last Edit: May 04, 2014, 02:53:49 AM by simpson36 »

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #171 on: May 04, 2014, 08:53:31 AM »
Quote
The Modbus plug-in is slick, but individual registers cannot be passed and Brain cant pass floats and so on. Modbus on MACH3 is basically a collection of workarounds, so I am anxious to see the MACH4 implementation. 

What he said.......
fun times

Offline Racer

*
  •  16 16
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #172 on: May 04, 2014, 08:57:28 AM »
I like to know the percent of completion the program I am running.

Added the Dro's and text to the tab then

Added this to the PLC Script

Where do I put this? Where is the (PLC Script) to add to?

Thanks

Code: [Select]
local TotalLines = mc.mcCntlGetGcodeLineCount(inst);
local GcodeCurrentLine = mc.mcCntlGetGcodeLineNbr(inst);
scr.SetProperty('droTotal', 'Value', tostring(TotalLines));
local GcodePercent = (GcodeCurrentLine/TotalLines) * 100;
scr.SetProperty('droPercent', 'Value', tostring(GcodePercent));




[/quote]

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Comments about Mach4 in Demo
« Reply #173 on: May 04, 2014, 09:00:45 AM »
I like to know the percent of completion the program I am running.

Added the Dro's and text to the tab then

Added this to the PLC Script

Where do I put this? Where is the (PLC Script) to add to?

Thanks

Code: [Select]
local TotalLines = mc.mcCntlGetGcodeLineCount(inst);
local GcodeCurrentLine = mc.mcCntlGetGcodeLineNbr(inst);
scr.SetProperty('droTotal', 'Value', tostring(TotalLines));
local GcodePercent = (GcodeCurrentLine/TotalLines) * 100;
scr.SetProperty('droPercent', 'Value', tostring(GcodePercent));




[/quote]

Ya Nvr No has already posted this, possibly in this thread.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Racer

*
  •  16 16
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #174 on: May 04, 2014, 09:05:42 AM »
I like to know the percent of completion the program I am running.

Added the Dro's and text to the tab then

Added this to the PLC Script

Where do I put this? Where is the (PLC Script) to add to?

Thanks

Code: [Select]
local TotalLines = mc.mcCntlGetGcodeLineCount(inst);
local GcodeCurrentLine = mc.mcCntlGetGcodeLineNbr(inst);
scr.SetProperty('droTotal', 'Value', tostring(TotalLines));
local GcodePercent = (GcodeCurrentLine/TotalLines) * 100;
scr.SetProperty('droPercent', 'Value', tostring(GcodePercent));





Ya Nvr No has already posted this, possibly in this thread.
[/quote]

I didn't see the answer to my question.

Where do I put this? Where is the (PLC Script) to add to?

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #175 on: May 04, 2014, 09:17:28 AM »
Open, the M4 screen designer, click on the top profile, go down to the properties window, click on the "Event" button,
looks like a little lightning bolt, find PLC script, go to the right hand side with button thatt has 3 little dots.
click it, it will open the PLC script in you lua editor.

scott
fun times

Offline Racer

*
  •  16 16
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #176 on: May 04, 2014, 09:24:09 AM »
Open, the M4 screen designer, click on the top profile, go down to the properties window, click on the "Event" button,
looks like a little lightning bolt, find PLC script, go to the right hand side with button thatt has 3 little dots.
click it, it will open the PLC script in you lua editor.

scott
Thanks Scott,
That works.

Jerry

Offline smurph

*
  • *
  •  1,544 1,544
  • "That there... that's an RV."
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #177 on: May 06, 2014, 01:28:37 AM »
HIYA STEVE, I ran itno a problem with this macro. IN the G65 call  Instead of the Parameter "A(#1)" being used to set the starting point angle for the macro Mach4 is trying to rotate the A axis to 45 deg at a VERY slow rate.


    O0008 (Main program)
    N005 G54 G90 S800 M03 T02 F100(Select coordinate system, absolute mode, start spindle, get next tool ready)
    N010 G00 X3.0 Y2.5 (Rapid to center of bolt hole pattern)
    N015 G43 H01 Z.1 (Instate tool length compensation, rapid up to workpiece)
    N020 G65 P1008 X3.0 Y2.5 Z0 R1.75 D0.75 A45.0 H8.0 C81. F50 (Machine entire bolt hole pattern with drilling cycle)
M30


    O1008 (Custom macro to machine bolt hole circle)
    #101=1 (Initialize counter)
    #102=#1 (Initialize current angle to A)
    #103=360 / #11 (Constant for incremental angular distance between holes)
    #104=#26 + 0.1 (Constant for rapid approach plane)
    #105=#26 - #7 (Constant for Z bottom position of hole)
    N1 IF [#101 GT #11] GOTO 99 (Test if loop is finished)
    #110=#24 + COS[#102] * #18 (Calculate X position for current hole based on current angle)
    #111=#25 + SIN[#102] * #18 (Calculate Y position for current hole based on current angle)
    G#3 X#110 Y#111 R#104 Z#105 F#9 (Machine current hole)
    G80 (Cancel cycle)
    #101=#101 + 1 (Step counter)
    #102=#102 + #103 (Step current angle)
    GOTO 1 (Go back to test at loop beginning)
    N099
 M99 (End of custom macro)


(;-) TP

Try running this without an offset on your A axis.  I think this is actually a G81 issue.

Steve.

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Comments about Mach4 in Demo
« Reply #178 on: May 06, 2014, 12:04:24 PM »

Thanks!  I'll look at that switch.  But if you are using a RS232 port, it doesn't make any difference.  The switch is there to make those RS232 to RS485 converters work... well...  better.  I still am not convinced that any RS232 to RS485 adapters is going to be a real solid solution.  But that is basically what that switch does.  It needs to be fixed.  Just don't let it stop you from using it with a RS232 port.

Steve
Absent documentation, I'm not getting anywhere fast. Is it possible to describe briefly how to get data on and off the Modbus? I saw some mc.********* functions having something to do with MACH Registers, but again, no idea if that it the correct path.

Bumping this to see if I can get a response. I started a new thread with Modbus in the title. Scripts and screens and G-code is easy and fun, but without Modbus working, continuing the MACH4 eval is pointless for me. I can get MACH4 hooked up with Serial and TCP. MACH4 says 'Modbus OK' but there is no Modbus communication and I can't make any sense out of the plug-in config.
Re: Re: Comments about Mach4 in Demo
« Reply #179 on: July 18, 2014, 01:54:57 AM »
Why do we need a PP option? That is what M3 was for. It is an outdated platform. It is time to move on. M4 will be fine.

Thanks for your support!  We hope Mach4 will be worth the wait.  And some of these guys are having a blast with it!  Which is really nice to see.

Steve


HIYA Brian , looking at the fixture and tool tables I see that we can now use the keyboard to move around in the values windows to do updates to the values which is VERY GOOD  BUT I do not see a way to EXIT out with a mouse.

Also reviewing the G98/99 calls I see we can now GOTO a sequence line.  Can I assume the the sequence number is the LINE # ??

Can we expect conditional in the near future to make that useful.

Also the calls are not consistant.

M98 Pxx Qxx Lxx      Where Q calls the GOTO line #

M99 Pxx                Where P calls the goto Line #

Would it not be more consistant for the Q to be used in both cases to call the GOTO line#  ??

Sent from my Xoom using Tapatalk
I'm not a complete idiot...
    there are some parts missing.