Hello Guest it is March 29, 2024, 04:05:54 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

551
HiCON Motion Controller / Re: Spindle as axis doesn't run smooth.
« on: April 21, 2018, 01:33:17 PM »
  I have steps, velocity, and acceleration set exactly the same in Mach4 config.

Do the Plugin Config Screen and Mach interpret the pulse train differently?

552
HiCON Motion Controller / Spindle as axis doesn't run smooth.
« on: April 21, 2018, 12:07:52 PM »
I have a GSK Servo Spindle.  Inside the Spindle Drive, I can run it via Step and Direction or 0-10V. 
I have it set up to run 0-10V great.
I have to switch it to position mode and then it will read the step and direction from Mach4.  It is not smooth though.  It is very jerky.  Even when I make it an Axis and Jog it, it is jerky.

Now the kicker, I test the motion inside the HiCON Plugin Configuration.  Motion is smooth.  I have steps, velocity, and acceleration set exactly the same in Mach4 config.

So, I'm wondering what is different when I run stuff in Mach vs just the plugin confg screen.

553
Mach4 General Discussion / Re: mcCntrlGcodeExecuteWait fail
« on: April 21, 2018, 12:00:53 PM »
Brett, that's a good idea.  RT can make his macro a wizard to generate the code.  I used the BH Wizard guts to make a wizard that generates lines of g code.

554
Mach4 General Discussion / Re: mach 4 plasma
« on: April 21, 2018, 11:54:56 AM »
The screen Bryanna talked about on the Mach Support YouTube channel had a teach function and was set up for Plasma, with torch voltage dials. 

But I am with Craig, what exactly do people want in a plasma screen set?  The screen editor is very powerful.  You can do all kinds of stuff with it. 

555
Mach4 General Discussion / Re: MPG strange behavior
« on: April 16, 2018, 10:15:54 AM »
Craig,
Here is a test I have set up on my computer at work.
I have a button to toggle Input10 on and off.  I added a message to it.  It runs in the PLC Script and only logs 1 message per button press.

     local inst = mc.mcGetInstance()
     local MessageVar = mc.mcCntlGetPoundVar(inst, 400)
     local Input10 = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT10)
     local hSig = mc.mcSignalGetHandle(inst, mc.ISIG_INPUT10)
     local State = mc.mcSignalGetState(hSig)
     if State == 1 then
         scr.SetProperty("TestTextBox", "Value", "On")
         if MessageVar == 0 then
             mc.mcCntlSetLastError(inst, "Input 10 is on.")
             mc.mcCntlSetPoundVar(inst, 400, 1)
         end
     else
         scr.SetProperty("TestTextBox", "Value", "Off")
         mc.mcCntlSetPoundVar(inst, 400, 0)
     end

556
Mach4 General Discussion / Re: lua code help please
« on: April 16, 2018, 09:01:20 AM »
Okay,
So you need to put this script inside each of your buttons.  Put it in the "Clicked Script", that will be fine.
You will have to change the output numbers to meet your need.  I used 5-8 for this example.
This is a quick way to accomplish what you want. 


--Turn on Output 5 turn off Outputs 6, 7, and 8.
local inst = mc.mcGetInstance()
local Output5 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT5)
local Output6 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT6)
local Output7 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT7)
local Output8 = mc.mcSignalGetHandle(inst, mc.OSIG_OUTPUT8)

mc.mcSignalSetState(Output5, 1)  --On
mc.mcSignalSetState(Output6, 0)  --Off
mc.mcSignalSetState(Output7, 0)  --Off
mc.mcSignalSetState(Output8, 0)  --Off

You will have to go into each button and change the SetState to 0 or 1 depending on which output you want to turn on with each button.

557
Mach4 General Discussion / Re: lua code help please
« on: April 16, 2018, 08:33:40 AM »
What do you want to turn on?  An output?

558
Mach4 General Discussion / Re: MPG strange behavior
« on: April 14, 2018, 02:13:23 AM »
Check page 1 for more info

559
Mach4 General Discussion / Re: MPG strange behavior
« on: April 14, 2018, 01:45:56 AM »
It always bugged me there wasn't an easy way to relay 1 message in the PLC script.   I came up with this idea about 2 weeks ago.   It works pretty good for what I'm doing.   Hopefully it can help others out as well.  

I was inspired by needing to find a way to run a function in the PLC script once enable was pressed the very first time.   Did you know there is a register that keeps track of how many times you enable/disable Mach?   Pretty cool.  
I used the first instance but it kept looping.   So I changed the register to 2 once I was finished running the function, that solved the looping.
This clicked for messages. Use Registers... VARS#

560
Mach4 General Discussion / Re: MPG strange behavior
« on: April 14, 2018, 01:40:45 AM »
I'm typing on my phone.   Excuse all the syntax errors.