Hello Guest it is April 24, 2024, 02:12:13 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.


Topics - sour kraut

Pages: 1
1
Mach4 General Discussion / Running a subroutine from inside a macro?
« on: February 13, 2018, 12:00:34 AM »
Very random question.  I know that the subroutine's O# or name must match the main files O# but can you call said subroutine from inside a macro?  What if I would need to call multiple subroutines from inside of a file?  Is it possible to have it open a different O# subroutine?

Thanks.

2
Mach4 General Discussion / Mach4 Signal Script
« on: November 16, 2016, 02:44:46 PM »
I'm having issues calling the SigLib in the screen load script and for the life of me I don't know what's going on.  I have searched these forums and gone through the scripting PDF that is installed with the software( which needs to be fixed!! ) but can't find the answer.  Here's what I am wanting to do:
I want to assign a key on the keyboard to perform the same task as the "Button Jog Mode" Button. If I press it, the state will change from "Continuous" to "Incremental" or vice versa.

Here is what I have done so far:

1. Assigned a new input inside of the keyboard plugin and then assigned it to input 63 per the "Quicky 2" video.
2. Verified that the input is working in the diagnostics log.
3. Added the following code to the Screen Load script. It is truncated for simplicity.
Code: [Select]
SigLib = {
[mc.OSIG_MACHINE_ENABLED] = function (state)
    machEnabled = state;
    ButtonEnable()
end,

[mc.ISIG_INPUT0] = function (state)
   
end,

[mc.ISIG_INPUT63] = function (state)
    if (state == 1) then   
        --CycleStart()
        ButtonJogModeToggle()
    --else
        -- Do something else
        --mc.mcCntlFeedHold (0)
    end

end,
}

4. Added the following code to the Screen Load script.
Code: [Select]
if (SigLib[mc.ISIG_INPUT63] ~= nil) then
    SigLib[mc.ISIG_INPUT63](state);
end

If I put the information into the PLC script like in the video instead of in the screen load and signal scripts, then the state of the button changes continuously while the button is held down.  Please help me as I have searched and cannot find an exact, consice answer.  Thank you for looking.

3
PoKeys / 56U incorrect motions
« on: March 22, 2015, 06:13:16 PM »
I've got a 56U connected as an external 4 axis controlller using the circuit in the pokeys manual feeding into a G540.  when I give it a command on the MDI line to go positive on any of the 3 axis, it goes the correct distance.  If I give it the same command but make it negative, it only goes half the distance.  I'm running mach Version R3.043.067 and the pokeys plug in 1.0.0.1.  I have mach set for 45000Hz and the max step for any axis is 12000. I am using Windows 7 64bit on an HP pavilion G series laptop if that matters any. I have double and triple checked my wiring to make sure it is correct.  Has anyone seen this before?  Thanks in advance.

4
PoKeys / Step and Direction pulse width?
« on: February 03, 2014, 01:46:24 PM »
Using the external pulse generator, what can I expect as the step and direction pulse widths? I would also like to know if these are active low or active high pulses and how I can change that if possible. I ask this because the documentation says that the settings are ignored in the motor tuning screen, and the ports and pin screen but the drives I am using seem to be finicky.  I can run at slow speeds,  50ipm with an accel of 10 but if I try to use 100ipm with the same accel the motors miss steps and shutter.  My steps per unit are only set to 2612.5 so it should not be taxing the computer.  I'm going to change the motor tonight to see if it is a bad motor but I'm doubtful.  I would greatly appreciate any help anyone can give.  Thank you. 

5
Feature Requests / Feature request- Axis redirect
« on: December 19, 2009, 01:00:54 AM »
I would like to request that EIA 274-D standard codes G26 and G27 for axis redirect on and off be implemented if at all possible. I am getting ready to rebuild my machine and would like to build it with a Y axis and a V(A) axis(duel table machine).  I would like to be able to set a main program to call a sub to run on the first table then have the main redirect to the second table and rerun the same sub file.  Thank you for such great software!!

6
VB and the development of wizards / New to this....
« on: March 03, 2008, 04:12:46 PM »
Ok, this is my first post, so don't scream at me too much please.  I've worked for a major CNC company for 8 years now and decided To get a hobby machine.  Long story short, I'm trying to get the mach software to act similar to the controller I'm used to,,Gulp,, the 91000 Supercontroller by Thermwood.  I'm familiar with VB so I wanted to run my first attempt by everyone so they can tell me if I'm an idiot.  The following code is for a tool length measuring setup.  The sensor would be similar to the touch probe I've seen on here only upside down.  Anyway, here's the code. Rip it to shreds if need be.  Thanks in advance.

REM This macro measures the tool
REM 03/00/08

Dim xposition as double   'absolute x position of the center of the sensor
Dim yposition as double   'absolute y position of the center of the sensor
Dim switchtable as double 'distance from the top of the sensor to the top of the table
Dim switchinput as single 'switch input number
Dim zposition as double   'absolute position of tool at sensor top
Dim machinez as single    'absolute z machine coordinate dro call value
Dim toolnumber as single  'active tool toollength Dro call value


toolnumber = 836         
machinez = 85


REM ************************************
REM ******User definable variables******
REM ************************************

xposition = ???.????
yposition = ???.????
switchtable = ?.????
switchinput = ?

REM ************************************
REM ***End of User definable variables**
REM ************************************

Code "G59 P0"                             'Machine coordinates
Code "G90"                                'Absolute positioning
Code "T1"                                 'Tool 1 call, can be removed for tool changer

Code "G00 X[xposition] Y[yposition]"      'Move to sensor position in X and Y

Do
   Code "G01 z-.1 F45"                    'Move Z down in .1 increments until
Loop While Isactive(switchinput) = true   'sensor input becomes low

Do
   Code "G01 z.01 F45"                    'Move Z up in .01 increments until
Loop While Isactive(switchinput) = False  'sensor input becomes high

Do
   Code "G01 z-.001 F45"                  'Move Z down in .001 increments until
Loop While Isactive(switchinput) = true   'sensor input becomes low

Do
   Code "G01 z.0001 F45"                  'Move Z up in .0001 increments until
Loop While Isactive(switchinput) = False  'sensor input becomes high


zposition = GetOEMDRO(machinez)           'read absolute Z position
zposition = (zposition + switchtable)     'Add absolute Z and sensor height
SetOEMDRO(toolnumber) = zposition         'set active tools new toollength

Code "G59 P0"                             'Machine coordinates
Code "G90"                                'Absolute positioning
Code "G0 Z0"                              'Move to absolute Z zero
Code "G0 X0 y0"                           'Move to absolute X and Y zero


Pages: 1