Hello Guest it is April 27, 2024, 11:03:35 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 - Bill_O

351
Mach4 General Discussion / Re: floating point information
« on: June 04, 2019, 03:35:31 PM »
Craig,

Thanks.
Now i will need to buy the expensive a$$ camera and test it.

Bill

352
Mach4 General Discussion / floating point information
« on: June 03, 2019, 04:31:22 PM »
I am currently using Mach3.
I have a camera that is used to find some fiducials and send some data letting me know how far of center they are.
The camera only sends floating point data and that does not work in Mach3.
So as of right now I bring the information into a Red Lion Data Station to send out fixed point information to Mach3.
My question is does Mach4 accept floating point data?

Thanks,
Bill

353
Mach4 General Discussion / button and plc behavior
« on: May 03, 2019, 11:58:13 AM »
I have a new profile I am making and am having what I think is strange behavior.
I have attached the code for the buttons and the plc.

I have 4 buttons, 2 dros, 1 led and some script in the main PLC.
The buttons raise or lower the values in the dros and the plc turns the led on or off depending on the value.

If I click the Jog Minus button the dro value changes and the led turns on.
If I click the Jog Plus button until the dro value is 100 the led turns off.

Same thing for the Cut Minus then Plus buttons.
The problem is with the Cut Plus then Minus buttons.

If I click the Cut Plus button the dro value changes and the led turns on.
If I click the Cut Minus button until the dro value is 100 the led will does not turn off.

354
Mach4 General Discussion / Re: loop in macro till register changes
« on: May 02, 2019, 04:55:14 PM »
It worked great once i fixed my mistake.

I changed what Craig wrote a little just because it is easier to understand for me.
Unfortunately when I do that it usually results in an oops.
Here is the completed code.

 --check for manual cut and wait if manual cut on
   local hregC = mc.mcRegGetHandle(inst, 'iRegs0/ManCut')
   local ManualCut = mc.mcRegGetValue(hregC)
   while (ManualCut == 1) do
      wx.wxMilliSleep(100)
      ManualCut = mc.mcRegGetValue(hregC)
      ManCutWasOn = 1
   end
   if (ManCutWasOn == 1) then
      mc.mcRegSetValue(hregC, 1)
   else
      mc.mcRegSetValue(hregC, 0)
   end


My mistake was that instead of getting the Register value in the While loop like Craig showed me I did it with a variable.
Well at first I did not have it getting the register value inside the loop so of course the variable never changed in the While loop.
Worked great after I added the "ManualCut = mc.mcRegGetValue(hregC)" inside the loop.

355
Mach4 General Discussion / Re: loop in macro till register changes
« on: April 29, 2019, 03:04:42 PM »
Craig,

Thanks again.

Bill

356
Mach4 General Discussion / Re: loop in macro till register changes
« on: April 29, 2019, 12:00:10 PM »
Craig,

Sorry for the late reply I was out of town at a trade show.

1. The macro is an m code. Happens to be m60 called in a g code file.
2. If the register does not change it just sits in the loop until changed or the software is turned off.
3. The register just changes between 0 and 1
4. A second would probably be fine but less would be better.

Thanks,
Bill

357
Mach4 General Discussion / Re: WTH
« on: April 18, 2019, 04:38:18 PM »
Found the problem.
In the button name i had a + sign.
changed it to Plus and no more problems

358
Mach4 General Discussion / Re: WTH
« on: April 18, 2019, 03:49:07 PM »
ok it is not the code.
I copied the FRO + code into a new button.
Same error.
it is almost like anything to do with the fro can not have anything but the buttons supplied
i do not want a slider so i need to change the code but i am afraid to now wondering if i will jack the whole thing up

359
Mach4 General Discussion / WTH
« on: April 18, 2019, 02:34:43 PM »
I keep being told it expects '(' near '+'.
I have () the hell out of it as many ways as I can and always the same thing.
Please tell me what is wrong with this code.

local inst = mc.mcGetInstance()
local CutMax = 250
local CutNow = mc.mcCntlGetFRO(inst)
local CutNow2 = tonumber(CutNow)
local CutNow3 = CutNow2 + 10
mc.mcCntlSetFRO(inst, CutNow3)

Bill

360
Mach4 General Discussion / Re: Mach4 with Pokeys57CNC and FRO
« on: April 18, 2019, 01:48:45 PM »
local analog2 = tonumber(analog)