Hello Guest it is April 19, 2024, 09:16:47 PM

Author Topic: Screen Set Ideas  (Read 184805 times)

0 Members and 1 Guest are viewing this topic.

Re: Screen Set Ideas
« Reply #90 on: July 18, 2014, 12:45:45 PM »
Took Scott's modbus and the DL06 idea and made some changes so the buttons and inputs follow the display logic

Sorry... the photos not that great, it is taken with a "go pro" snap shot and it's little dark in the shop

So to manually set an output I just toggle a bit button
« Last Edit: July 18, 2014, 03:14:38 PM by Ya-Nvr-No »

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Screen Set Ideas
« Reply #91 on: July 18, 2014, 08:20:20 PM »
The PLCs, Input Switches, and Output Lights of THE:  "Bat Desk"....

 ;D

Scott
« Last Edit: July 18, 2014, 08:23:16 PM by poppabear »
fun times
Re: Screen Set Ideas
« Reply #92 on: July 19, 2014, 07:59:57 PM »
For those who are blind or want to see more gcode on their screen.  My first trivial contribution:

I added buttons to my G-code display on the Program Run screen to allow increasing or decreasing the font size on the fly.  This allows the number of lines to be displayed to increase or decrease. 

To the button that increases the font size I added following code to the "Left Up Script" property:

Code: [Select]
local gcode1Lines = scr.GetProperty('gcode1','Lines','Lines',0);

scr.SetProperty('gcode1','Lines',tostring(gcode1Lines-1));

To the button that decreases the font size I added:

Code: [Select]
local gcode1Lines = scr.GetProperty('gcode1','Lines','Lines',0);

scr.SetProperty('gcode1','Lines',tostring(gcode1Lines+1));

I did say it was trivial.  It is useful if you want to see more G-code.

Oops I didn't crop the files :(



-Freeman
I'm not a complete idiot...
    there are some parts missing.

Offline smurph

*
  • *
  •  1,546 1,546
  • "That there... that's an RV."
    • View Profile
Re: Screen Set Ideas
« Reply #93 on: July 19, 2014, 11:59:39 PM »
You guys are taking the ball and running with it!  These are all awesome ideas.  Complex or trivial it matters not.  They are all things that will help you out running the machines and they are all things that could not be done before.  So keep 'em coming!

Steve
Re: Screen Set Ideas
« Reply #94 on: July 20, 2014, 04:59:55 PM »
Good job Freeman, I'd like to see this thread full of ideas and contributions.  :) so I second it, keep em coming.

Scott, you have a Nice work area, and you get to sit down at a desk to program. I'm either standing, sitting on a rolling stool or worse the floor.

Now if we can get those code monkeys to work out the mach4 core details.  ::)
Re: Screen Set Ideas
« Reply #95 on: July 21, 2014, 12:42:56 AM »
A variation on this code:

Code: [Select]
local TotalLines = mc.mcCntlGetGcodeLineCount(inst);
local GcodeCurrentLine = mc.mcCntlGetGcodeLineNbr(inst);
scr.SetProperty('droTotal', 'Value', tostring(TotalLines));
local GcodePercent = (GcodeCurrentLine/TotalLines) * 100;
scr.SetProperty('droPercent', 'Value', tostring(GcodePercent));

is to use a gauge and set the "Code" property to track the "Current G Code Line".  I then added a SigLib handler to the startup script for mx.OSIG_RUNNING_CODE to initialize the "Range" property to either the total line count of the current file if running gcode or zero.

My SigLib block looks like:

Code: [Select]
[mc.OSIG_RUNNING_GCODE] = function (state)
        local inst = mc.mcGetInstance();
        local totalGcodeLineCnt = mc.mcCntlGetGcodeLineCount(inst);
        if (state == 0) then
            scr.SetProperty('guaMySMWorkGuage','Range','0');
        else
            scr.SetProperty('guaMySMWorkGuage','Range',tostring(totalGcodeLineCnt));
        end
    end,

As the gcode runs the gauge tracks the percentage of work done automatically.


-Freeman
I'm not a complete idiot...
    there are some parts missing.
Re: Screen Set Ideas
« Reply #96 on: July 21, 2014, 07:53:30 AM »
Could be nice for monitoring during cycle runs, thanks

also I have found that gauges does not seem to work on some computers as the gauge display does not update properly.
« Last Edit: July 21, 2014, 08:10:56 AM by Ya-Nvr-No »
Re: Screen Set Ideas
« Reply #97 on: July 27, 2014, 08:05:51 PM »
been playing with a new wizzard that uses combobox's to hold the machine variables that are not equal  to zero.

Thought others might like to play and experiment with a wizzard.

The number on the far left is how many variables are in the combobox on its right, as the number of variables increase combobox get added
maximum of 25 combo boxes

still learning too, so if you find some tricks to add to this; please post.

Re: Screen Set Ideas
« Reply #98 on: July 27, 2014, 08:41:03 PM »
Thought others might like to play and experiment with a wizzard.

Thanks Craig,

Very timely since I'm trying to find where the current fixture # (not coordinates) are stored.  I'm trying to display which of G54-59 is current in effect.


-Freeman
I'm not a complete idiot...
    there are some parts missing.
Re: Screen Set Ideas
« Reply #99 on: July 28, 2014, 09:47:47 PM »
Was playing around with timers and came up with a function call that incorporates all three.
made a series of buttons to test
pass the amount of time and the mode, does some minor error checking and resets the mode.
sleep(.5,0) would get you a 1/2 second delay converts it to a 500 millisecond sleep
not really that functional but it shows how to pass variables and do some calculations and toggle button actions

Code: [Select]
local inst = mc.mcGetInstance()
local butstate = 0;
butstate = scr.GetProperty('togTimer(0)', 'Button State', 0);
if (butstate == '1') then
     sleep(1,0);
end

Code: [Select]
function sleep(howlong, mode)
    local millitime = howlong;
    local microtime = howlong * 1000;

    if (mode == 0 and howlong < 1) then
        mode = 1
        millitime = howlong * 1000;
    elseif (mode == 2 and howlong < 1000) then
    mode = 1
        microtime = howlong;
    end
    if (mode == 0) then
        wx.wxSleep(howlong);
       -- mc.mcCntlSetLastError(inst, 'seconds = ' .. tostring(howlong));
        scr.SetProperty('togTimer(0)', 'Button State', '0');
    elseif (mode == 1) then
       -- mc.mcCntlSetLastError(inst, 'milliseconds = ' .. tostring(millitime));
        wx.wxMilliSleep(millitime);
        scr.SetProperty('togTimer(1)', 'Button State', '0');
        scr.SetProperty('togTimer(3)', 'Button State', '0');
        scr.SetProperty('togTimer(4)', 'Button State', '0');
    elseif (mode == 2) then
       -- mc.mcCntlSetLastError(inst, 'microseconds = ' .. tostring(microtime));
        wx.wxMicroSleep(microtime);
        scr.SetProperty('togTimer(2)', 'Button State', '0');
    else
        mc.mcCntlSetLastError(inst, 'Ya screwed up the delay time');       
    end
end