271
SmoothStepper USB / Re: ESS and Vista Unidentified network
« on: August 01, 2014, 02:40:51 PM »
you mean other that getting rid of Vista, Me or Win8?
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.
local var4012 = mc.mcCntlGetPoundVar(inst, 4012);
local var15127 = mc.mcCntlGetPoundVar(inst, 15127);
fixtureNum = (53 + var4012)
fixtureNum2 = (var15127)
scr.SetProperty('droFixture', 'Value', tostring(fixtureNum));
if (fixtureNum2 >= 0) then
scr.SetProperty('txtFixture', 'Label', 'G54.1P' .. tostring(fixtureNum2));
else
scr.SetProperty('txtFixture', 'Label', 'G' .. tostring(fixtureNum));
end
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.
local inst = mc.mcGetInstance()
local butstate = 0;
butstate = scr.GetProperty('togTimer(0)', 'Button State', 0);
if (butstate == '1') then
sleep(1,0);
end
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