Hello Guest it is March 29, 2024, 10:10:29 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 - Cbyrdtopper

81
Mach4 General Discussion / Re: Mach4 screen action/script precedence
« on: August 04, 2022, 09:57:01 AM »
You could set up a test that pops up a message. 
Set the action to something that runs as a function from the screen load script... ie the cycle stop function and add a mc.mcCntlSetLastError(inst, "Test Action") to the function and then have your script do the same thing:
local inst = mc.mcGetInstance()
mc.mcCntlSetLastError(inst, "Test Script")

I tried this on my end.  I couldn't get a button to do any actions.  Weird.  I never use the actions, I always add scripts to buttons. 
Maybe try this on your end and see what you can do.

82
I'll post my m6 Script from the mill I'm working on.  It is incredibly extensive and has the ability to empty the spindle when you call up tool 0.

I use an external PLC because it is far FAR more stable then anything I've used in the past as far as motion controller breakout boards. 

For 1, it is all 24vdc so it is very stable with noise.  Also..... it is a PLC.  If there are tasks you don't want to code in Mach4... just write a few rungs of ladder logic and you never have to worry about it... for example.. lube pump timing, low fluid levels can be run through the PLC and send an alarm to Mach4... etc...

83
You could probably write a macro to adjust the tool offsets to match what it needs to as far as your CAM setup. 
Again, what you're asking about is probably kinematics... which Mach4 doesn't have yet. 

https://www.machsupport.com/forum/index.php?topic=38140.10

I found this, I couldn't remember where I had seen it so I went searching.  Maybe reach out to him via personal message and see if he can chime in here.

84
I'm a little confused now... You can just set a tool offset and call it up.  From what you're saying; by setting up a jig to get the tool stickouts the same.... you can just set a tool offset.
Are you needing to change the tool length offset each time you index one of the rotational axis?

85
As of now, Rigid Tapping is controlled by the motion controller; in this case, CS-Lab.  From what I gather, Mach4 cannot do this internally because Windows is not real time. 
I have not gotten Rigid Tapping to work with the HiCON from Vital Systems even when they claim it has the ability to... I'm not sure why it doesn't work, but we get around it by using floating tap holders.    I am anxious for it to work correctly though; it will be much better than using floating tap holders.

As far as the Spindle Orient, that is something you will have to figure out.  If your spindle is a servo spindle and has the ability to use step and direction for positioning, then you should be able to find a way to set up the spindle as a motor and as a spindle.  I think there are some API calls to achieve this. 
Some servo spindles I have in the shop have their own built in orientation and I just have to give the drive an input and it does it automatically. 
All of the code to do what you want will be put in the m19 macro.

86
Your Work Coordinate System; your work zero.  Make sure it is set up in CAM at the center of your rotating axis and that you have modeled the fixture you're using or your platter and place your work piece on the machine exactly as it is in your CAM model.  You also need to be sure to set your work zeros in the machine at the centers of rotation. 

87
Currently, Mach4 does not have kinematic.  I did see in the change log that it has been mentioned, no idea where kinematic are at for Mach4.
However, you may be able to set it up in CAM, just have your WCS correct in space with your fixture or platter.

I did see someone on here has a router  and they made their own kinematic macro to update tool position with each rotation axis move. 

88
It depends on your setup.
On my Hurco, the PLC always know where the carousel it is due to the input combination for every position.

I have a lathe that has no index switch or home sensor for the turret. On Mach4 startup, I have a message box pop up asking for the current turret position, the user input updates the PLC counter.

The mill I’m currently working on has a tool 1 position sensor, so I home the carousel in my Reference All button and I also have a Carousel home button in case I need it otherwise.  The m6 Macro will tell me if the carousel isn’t home and will not run.  The PLC counter updates to “1” after the homing sequence.

89
I use the Click PLC from Automation Direct.  I get the Ethernet version so I can use TCP modbus.
I use the HiCON on everything now.  I’ve used the ESS smoothstepper before and I much prefer the HiCON.

I think I have laid out TCP modbus setup with the Click PLC somewhere on this forum. You can search for it.

90
https://www.machsupport.com/forum/index.php?topic=34228.20

Here is a link to an old M6 I had done a while back.  I'll see if I can get the one of the machine I'm working on and post it here.
It is extremely more comprehensive.