Hello Guest it is April 28, 2024, 07:09:53 PM

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 - brandonb

Pages: « 1 2 3
21
Mach4 General Discussion / Re: Making a connection through rs232 in Mach4
« on: November 30, 2019, 04:08:47 PM »
Well done guys.

I am trying to accomplish the same. It seems that you aren't using the Serial Plugin that ships with Mach4, are you? Have anybody tried using it? I cannot find any documentation about it and I could imagine using the official plugin might be more future proof(?)

Best regards

Brandon

22
Mach4 General Discussion / Re: MACH 4 screen contrast
« on: November 30, 2019, 03:43:16 PM »
Hi Chuck,

Mach4 sometimes fails to render the background of the toolpath as configured in the control configuration. Sometimes it renders it light orangy so that it becomes harder to see the lines. Furthermore the line width configuration does not work for me. Maybe another bug.

But other from that you can configure all the colors of the lines and the background as you desire. You do this in the Configure > Control Menu rather than in the screen editor. In the configuration dialog choose "Tool Path" tab and configure the colors.

See attached image.

Best regards

Brandon

23
You could also just use the Output Mapping of Machine Enabled directly to your Port 3 / Pin 9. This would work out of the box but would only work if you do not already got a pin mapping configured there.

To do this just click Configure > Control and select the tab "Output Signals". Scroll down until you find "Machine Enabled" signal and configure it.

Mach4 has many of these prebuild signals that one should use.

24
I think what you want is to copy the machine enable state to your output. I would just use the PMC Editor (Configure > PMC) for that.

See attached image. This will run every 10 ms and copy the machine enabled signal to your output 49.

To do this, you can do this:
1. In PMC Window, click Settings > Code generator and select LUA
2. Instruction > Insert Contact
3. Double Click newly created contact and configure:
    - Source: Core Output
    - Name: machineEnabled
    - Device: Signal
    - Object: Machine Enabled
    Accept with click on ok.
4. In PMC Window move the cursor behind your newly created contact by clicking there
5. Instruction > Insert Coil
6. Double Click newly created coil and configure:
    - Source: Core Output
    - Name: output49
    - Device: Signal
    - Object: Output #49
    Accept with click on ok.
7. Click File save and save the pmc to C:\Mach4Hobby\Pmc
8. Click Generate and save the lua script there too

Then do what is described in this video at 4:47 to enable the PMC script:

https://youtu.be/jVhH9qyjjf0?t=287

It should work then. Add in PMC another rung for cycle start and your other output. Dont forget to hit Generate again.



25
Mach4 General Discussion / Re: How to process analog inputs
« on: November 28, 2019, 11:09:08 PM »
Awesome. Thank you very much Craig.

It works now. The analog values are being picked up and stored to the properties of Mach 4. I use the following code to set the jog rate:

Code: [Select]
local hReg, rc, val;
hReg, rc = mc.mcRegGetHandle(inst, "CSMIO-IP/Analog Input 0");
val, rc = mc.mcRegGetValue(hReg);

-- covert 0..10 V to 0..100 %
val = val * 10.0;

mc.mcJogSetRate(inst, mc.X_AXIS, val);
mc.mcJogSetRate(inst, mc.Y_AXIS, val);
mc.mcJogSetRate(inst, mc.Z_AXIS, val);
mc.mcJogSetRate(inst, mc.A_AXIS, val);
mc.mcJogSetRate(inst, mc.B_AXIS, val);
mc.mcJogSetRate(inst, mc.C_AXIS, val);

scr.SetProperty("droJogRate", "Value", string.format (val))

Best regards

Brandon

26
Mach4 General Discussion / Re: How to process analog inputs
« on: November 28, 2019, 08:58:13 PM »
Thanks for your help Craig,

What you say makes sense. But i cannot find any mention of registers in the manual of the controller.

Is there somehow a way to list all registers in Mach? Maybe I can spot the CSMIO Registers then.

Best regards

Brandon

27
Mach4 General Discussion / How to process analog inputs
« on: November 28, 2019, 06:40:17 PM »
Hi,

I have some analog inputs (potentiometers) which are supposed to control the feed and spindle rate. How would one script that in Mach 4? What would be the proper way to access analog values? There does not seem to be any analog input related page in the configuration menu. My controller is a CSMIO which comes with analog inputs.

I already have tried the awesome lua features in Mach 4 to program my toolchanger. But this consist of mainly boolean IO operations.

Best regards

brandon


28
Mach4 General Discussion / Mach4 Probing not working
« on: November 28, 2019, 06:01:53 PM »
Hi,

I bought an electrical probe from ebay and tried hooking it up with Mach 4. Its a 3D-Finder and my controller is a CSMIO. I connected it as described in the manual as PNP Sensor to my CSMIO.

It works fine, the input turns off when the probe hits an obstacle and it is on otherwise.

However i cannot make it work with the default Mach 4 Screen. Basically nothing in the Probing Tab works. It just seems to ignore the Probe. I tried to invert the input, but it does not change any behaviour. Is there something I forgot? Does this feature only work in the industrial version? I would be sad if thats the case because I just got the hobby version.  :(

Another thing i observed is that when probing and after some movement it does not just stop the axis but kicks the entire control off. Is there a way to just stop the axis without control off?

Besides that, how can you calibrate it? Is there scripts for that purpose somewhere?

best regards

Brandon

Pages: « 1 2 3