Hello Guest it is April 16, 2024, 01:56:12 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 - Ya-Nvr-No

501
Mach4 General Discussion / Re: DRO Code differences
« on: April 27, 2014, 04:30:45 PM »
Cool, works now, Thanks

Big help...

Looking forward to that documentation. Because looking on the net shows something different to me.

// Set up a value that may be used by a lexer for some optional feature.
void SetProperty(const wxString& key, const wxString& value);

having the property names and not knowing what to pass makes it a head scratchier.

Thanks again

502
Mach4 General Discussion / Re: DRO Code differences
« on: April 27, 2014, 03:14:54 PM »
Once you mentioned the location of the "screen managed images" and I found it, I understood, not sure what you are confused about.

I'm just not having luck finding out how to pass my computed value to the DRO I created.

local Xval = mc.mcAxisGetPos(0,0);
local Yval = mc.mcAxisGetPos(0,1);
local XYval =math.deg(math.atan(Xval/Yval));

droXY = XYval

Thanks

503
Mach4 General Discussion / Re: DRO Code differences
« on: April 27, 2014, 02:06:06 PM »
Thanks, but are there any examples of a PLC script and how to pass data? My dro named "droXY" must be passed a correctly formatted string or float. Just not sure what the proper way to do it is. Not much reference to it in the Docs folder.

Screen Manage Images: I see it now thanks




504
Mach4 General Discussion / Re: DRO Code differences
« on: April 27, 2014, 12:58:36 PM »
How do you pass a calculated value back to a screen DRO and "in real time"

Button and Image graphics are found where must be embedded? Some of them are corrupt. (not all there)
And there is no provisions to select images in folders using the Properties Images drop down list.

505
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 26, 2014, 03:49:02 PM »
Found my BONE HEADED mistake   :D or at least it better be,  ;D

local inst = mc.mcGetInstance();
Has to be declared before you use it, that's why on restart it was no longer declared.

Code: [Select]
function m3()
local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);
mc.mcCntlSetLastError(inst, 'Spindle Forward')
    mc.mcSpindleSetDirection(inst, 1);
end

Code: [Select]
function m4()
local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);
mc.mcCntlSetLastError(inst, 'Spindle Reverse')
    mc.mcSpindleSetDirection(inst, -1);
end

506
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 26, 2014, 12:15:28 PM »
BTW: For some reason the m3 m4 does not work again, though the code is still there. Only thing I think I did was save it as a new screen and shut it down and restarted mach4. Temper mental or what? worked fine for quite a few test, now other than the button for reverse and the led the mdi does not work again but just for the spindle.
 :o

507
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 26, 2014, 11:43:54 AM »
Bug report:
after leaving screen edit mode
the Enable button is blinking, should either be Disable or Axis Status should have been disabled on return. Little confusing.

question:
tried to turn off the Outputs Enable 0-3 led's but they get reset to default ON every time when Enable button pressed.
where do they get the status set to default ON from? Every output is not setup on the config page.
Tried setting the screen led default to OFF for each but no luck.

508
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 26, 2014, 11:02:39 AM »
Also figured out how to get the m3 m4 to work right with MDI or in the gcode
had to edit the mcs scripts as shown below
notice the direction is -1 for reverse.
I added a new button and led for reverse on the Spindle group
all works well now, come on I'm ready to move something. ;D
just not sure if these need to be local or not.
might change it to forward and reverse as it is just a message that is displayed in history

Code: [Select]
function m3()
mc.mcCntlSetLastError(inst, 'Spindle Clockwise')

local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);

    mc.mcSpindleSetDirection(inst, 1);
end

Code: [Select]
function m4()
mc.mcCntlSetLastError(inst, 'Spindle Counter Cockwise')

local inst = mc.mcGetInstance();
local sigh = mc.mcSignalGetHandle(inst, mc.OSIG_SPINDLEON);
local sigState = mc.mcSignalGetState(sigh);

    mc.mcSpindleSetDirection(inst, -1);
end

509
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 26, 2014, 10:12:37 AM »
figured out how to add a MDI group to the Diagnostic tab
I needed to edit the Cycle Start Button Script
added an elseif for the tab 3 (Diagnostic) and direct it to where to get the MDI data from.
Wish the copy and paste worked a little better as you have to use a text editor to hold the copy.
Once you close the scripter the copy is gone. You'll get used to it, I am sure.
I am starting to enjoy this, just wish I could drive some motors.  ;)

Code: [Select]
if (tonumber(tab) == 1) then
    local state = mc.mcCntlGetState(inst);
    if (state == mc.MC_STATE_MRUN_MACROH) then
        mc.mcCntlCycleStart(inst);
    else
        scr.ExecMdi('mdi1');
    end
    --Run MDI
    mc.mcCntlSetLastError(inst, "Do MDI")
    --wx.wxMessageBox("Do MDI")\
elseif (tonumber(tab) == 3) then
    local state = mc.mcCntlGetState(inst);
        scr.ExecMdi('mdi3');
    --Run MDI
    mc.mcCntlSetLastError(inst, "Do MDI")
    --wx.wxMessageBox("Do MDI")\
else
   --Do CycleStart
    mc.mcCntlSetLastError(inst, "Do Cycle Start")
    mc.mcCntlCycleStart(inst)
    --wx.wxMessageBox("Do Cycle Start")
end

510
Mach4 General Discussion / Re: Comments about Mach4 in Demo
« on: April 25, 2014, 10:36:09 AM »
I found it  ;D

default is Full screen, under the VIEW menu, I unchecked it and it resized.

I am running Win7 32bit