Hello Guest it is March 29, 2024, 06:05:36 AM

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 - smurph

291
Wow...  if you have to use CV for a part like that, then I suspect you are trying to drive your machine faster than it can go with regard to your acceleration parameters on your motor tuning.  Bad CV settings in combination with horridly slow acceleration parameters in your motor tuning will round corners like that.

Do Help->Support->Package profile and attach the packaged up profile.  Then I can take a look at your motor tuning.  BTW, you could work all of this out with the Sim plugin as your motion controller.  Just plugin your motor tuning numbers into the Sim profile.  You will see the cut path vs. the programmed path on the tool path. 

Steve

292
Mach4 General Discussion / Re: G68 Angle and Probing
« on: May 12, 2020, 03:39:59 AM »
??  Not impossible.  Probe the corner as usual, even if it is out of square.  The corner will then become X0Y0 (changes the work offset).  Then you probe to find the angle and then do G68 X0 Y0, R<angle>.  Done.  This way, the G68 doesn't change the work offset.  This is the way it is ALWAYS done. 

Steve

293
Coils and discrete inputs (outputs and inputs) show up as output and input objects in Mach.  And can be operated on via the mcIo*() API calls. 

I should have called the scan denominator a multiplier or "read every n cycles".  I have to change that!   If your scan time is 100ms, and scan denominator is 4, then the function is performed every 4 cycles (every 400ms) milliseconds.  Is is a way to SLOW the function.

All modbus devices implement things differently.  Sometimes, you may be reading a version or the like that comes from SLOW NVRAM.  If you have to read something like this, it can slow you whole scan!  So if you separate the slow read into its' own function, then you can read it less often via the multiplier (what is now called the denominator).

Also, in the later modubs plugins (4458 and up) you can control the plugin via its command register called mbcntl.  Look for it in the regfile plugin diag window.  You can actually test the commands in that interface.

mcRegSendCommand() will send the command and receive the response and it is a nice robust way to control a plugin that provides such a command register.

Anyway, the commands you write to the register are:
stop
start
restart

By themselves, they will operate on the plugin as a whole. But now you can operate on the device and function levels as well! Do this with the name of the device as seen in the modbus diag window.

start modbus0
stop modbus0
restart modubus0

Next, you can drill down to the function level.

start modbus0/fucntion1
stop modbus0/fucntion1
restart modubus0/function1

:) Total control now. So for your slow NVRAM read, just create another function and stop it when you don't need to read it anymore.

Here is the example in code:
Code: [Select]
hReg, rc = mc.mcRegGetHandle(inst, 'mbcntl/command');
response, rc = mc.mcRegSendCommand(hReg, 'stop modbus0') -- response will be OK or FAIL.
response, rc = mc.mcRegSendCommand(hReg, 'start modbus0')
response, rc = mc.mcRegSendCommand(hReg, 'stop modbus0/function1')
response, rc = mc.mcRegSendCommand(hReg, 'start modbus0/function1')

There is an Initial State that is defined at the function level too.  So you can control what is started at startup time.  In case you need to start a function up late with the command register.

Steve

294
We have a Mori at the shop that threads all day every day.  Threading is a motion controller dependent function.  For Mach, we treat G32 moves (the basis for all threading ops) as a regular feed moves.  But we mark them so that the motion controller can sync them with the spindle.  There is nothing else Mach can do, at this point, because the motion hardware has to do the real-time stuff. 

Steve

Hi Steve,

Just out of curiosity which motion controller are you using with your Mori and which version / build of Mach4 are you using with it please ?

Tweakie.

The Mori is using a Vital Systems HiCON controller.  I don't know the Mach build but Rob G would know as he is the primary operator of that machine.  I doubt the build would matter as threading is more dependent on the motion controller and its' associated plugin than the Mach build.  So I can confidently say that ANY Mach build.  :) 

It is a sweet machine to see in action! 

Steve

295
Mach4 General Discussion / Re: Reading Signals / ENUMS
« on: May 12, 2020, 12:59:06 AM »
cycletime, rc = mc.mcCntlGetValue(inst, mc.VAL_CYCLE_TIME, 0);

mc.VAL_CYCLE_TIME isn't really an enumeration.  It is a constant.

Anything that begins with mc.VAL_ is a constant and it is to be used with mc.mcCntlGetValue() or mc.mcCntlSetValue().

2007 isn't a #var location, it is a constant number that is assigned in the API header file.  See the snippet below.

// System values.
#define VAL_ACTIVE_TOOL        2000
#define VAL_AXIS_MACHINE_POS   2001
#define VAL_AXIS_POS           2003
#define VAL_AXIS_VEL           2004
#define VAL_BLOCK_DELETE       2005
#define VAL_CONTROLLER_MODE    2006
#define VAL_CYCLE_TIME         2007
#define VAL_DIA_REG            2008
#define VAL_DIST_TO_GO         2009
...

Steve



296
Mach4 General Discussion / Re: T## Oddities
« on: May 12, 2020, 12:47:38 AM »
Also, if NFS reads through here... Why is Mach 4 so unstable when it comes to shutting down incorrectly. I can't think of any other piece of software that I use that has such an adverse reaction. Heck, even if Mach 4 is closed and the computer is unplugged, it was mess stuff up. Can't this be protected against using save states in the software or some other method to automatically load a known good configuration?

Most of Mach's settings are in memory and flushed to the disk files upon shutdown (until recent builds).  So if the shutdown process is interrupted by turning off the PC, well...  BOO!  We don't know what or when a plugin may be writing to a settings file, so if Some plugin is writing to the Machine.ini file when the power is cut... BOO again!  That is one way to get corrupted. 

And ANY program that is writing to the disk when the PC is switched off or not shutdown properly can corrupt the disk file system.  So it may not be Mach that is having the issue with the shutdown.  It could be any other program that is running and IT corrupts the Mach config files.  Another way to get corrupted. 

Basically, we keep our settings in regular text files (not even XML files in Mach 4) to make them human readable/understandable.  There can be a lot of settings.  Parameters, system variables, Machine.ini, etc...  Unfortunately, this makes it more corruptible from an improper shutdown (whether Mach or some other program was writing to the disk) than say some program that saves it's settings in the OS PROTECTED registry hive file. 

Also, this seems to be PC dependent.  Disk driver type or something?  I have NEVER had disk corruption on my Mach 4 milling machine.  And I have messed up and pulled power before the PC was shut down probably 100s of times.  But I may not be using any of the same plugins you are using.  Plugins are definitely a wildcard here... 

All that being said, we have tried to put in a settings corruption detection mechanism in the most recent dev builds that will prompt you to restore previously saved settings files.  But that ONLY works if the backup setting files are not corrupted too!  Also, we don't try to flush all of the settings when Mach is shut down now.  However, again, we can't tell what the plugins may be doing.

So the best way to prevent corruption is to shut the PC down properly.  After all, it is proper Windows etiquette.

Steve

297
Mach4 General Discussion / Re: G68 Angle and Probing
« on: May 12, 2020, 12:07:03 AM »
You can't change the coordinate offset when G68 is in effect.  Set the G54 offset (or whatever offset you are using) first, then rotate the coordinate system with G68 around the Y0 point. 

Steve

298
As stated above, you can access the analogs as registers as they come in from the plugin using the register read/write functions.  This will let you access a raw ADC or DAC value, usually something along the lines of 0 to 1023 (10 bit ADC/DAC) or 0 to 4095 (12 bit ADC/DAC), etc...  Mapping these registers to an analog input give you the capability of working with voltages instead of raw ADC/DAC values, if required. 

For example, say you have a 12 bit DAC output with a voltage range of 0 to 10v represented by the scale of 0 to 4095, 0 being 0 volts and 4095 being 10 volts:

Set the numerator to the total voltage swing (0 to 10 = 10 volts total) and the denominator equal to the total capacity of the DAC bits.  12 bits == 4096.  Now you can use the mcAnalogOutputWrite() function with volts!

rc = mc.mcAnalogOutputWrite(inst, 1, 7.5) -- Set analog output 1 to 7.5 volts. 
rc = mc.mcAnalogOutputWrite(inst, 1, 2) -- Set analog output 1 to 2 volts. 

What if you have a bi-polar -10 to +10 volt 12 bit DAC that you want to set?

Set the numerator to the total voltage swing (-10 to +10 = 20 volts total) and the denominator equal to the total capacity of the DAC bits.  12 bits == 4096.  Most bi-polar DACs have mid scale as 0 volts, so set the offset to half of the denominator, 2048.

rc = mc.mcAnalogOutputWrite(inst, 1, -10) -- Set analog output 1 to -10 volts.  Raw DAC value will be 0.
rc = mc.mcAnalogOutputWrite(inst, 1, 0) -- Set analog output 1 to 0 volts.  Raw DAC value will be 2048.
rc = mc.mcAnalogOutputWrite(inst, 1, 10) -- Set analog output 1 to +10 volts.  Raw DAC value will be 4096.

Steve

299
Mach4 General Discussion / Re: Mach4 Touch Sceen
« on: May 11, 2020, 11:36:46 PM »
The sky is the limit for screens.  It is nice to see some slick looking examples!

Steve

300
Mach4 General Discussion / Re: Mach4 feature vs Mach3
« on: May 11, 2020, 11:34:50 PM »
11. Screw mapping.
12. Surface mapping.
(Fixing hardware in software since 2011.)  :)
13. Multiple probe capability.
14. Full Fanuc Macro B support (Industrial)
15. Built in popup keypads for touch screen support.
16. Multi-level block delete support.  It rocks if you ever have to use it.
17. A much nicer tool path with built-in views (left, right, top, bottom, ISO, etc...) and custom colors PER tool path. 
18. Support for tool arm style tool changers. (Tool pre-loads)
19. Up to 999 tools.
20. Tool Life Management (Industrial)
21. Full Fanuc type C cutter compensation. 
22. In Mach 4, you can't inadvertently stomp on resources that have already been used by something else.  There were a lot of OEMLED and OEMDRO clashes in Mach 3.
23. Awesome plugin script control is possible (if command registers are provided by the plugin).

I'm tired now... All of this thinking!!! 

Steve