Hello Guest it is April 23, 2024, 09:12:10 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 - jbuehn

Pages: 1 2 3 4 5 6 7 8 9 10 11 »
1
You could enable logging and then look to see if something is executing GCode or MDI that's moving the machine after homing.

2
Mach4 General Discussion / Re: Assign Generated GCode to GCode Box
« on: May 06, 2022, 12:24:55 PM »
A couple different options...

There are some APIs to load G code, either from a file or a string. So you could write your G code to a file and then use mc.mcCntlLoadGcodeFile(), or mc.mcCntlLoadGcodeString() if you wanted to load it directly from a string instead of a file. The API docs in C:\Mach4Hobby\docs will be helpful for how to use those API calls.

or...

Are you familiar with the scr.SetProperty() API? The notebook in the screen editor that has your G code and MDI tabs, there sound be a property like "Current Tab" you can set with the scr.SetProperty() API to flip between tabs. I believe the tab number is a string of the zero-based index. So "0", "1", etc.

3
Mach4 General Discussion / Re: Mach 4 DRO Reading Incorrectly
« on: May 02, 2022, 05:55:25 PM »
Does it move 1" when you command the axis to move 1" in GCode?

4
Mach4 General Discussion / Re: Mach4 PMC Cycle Start problem
« on: April 22, 2022, 01:41:57 PM »
I haven't used the PMC much so there may be a way to do it in there?

Otherwise you could use the signal library in the screen load script. When your button input goes high, call the same same CycleStart() function the screen's Cycle Start button calls...plus any other logic you may have in the PMC script.

If you're unfamiliar with the signal library stuff, there's some good info on this forum. Craig has some nice intro stuff here:
https://www.machsupport.com/forum/index.php?topic=40051.msg267764#msg267764

5
Mach4 General Discussion / Re: Mach4 PMC Cycle Start problem
« on: April 21, 2022, 12:08:19 PM »
You could look at the code behind the Cycle Start button on the screen, but it's basically calling a different API based on whether the GCode tab is active, or the MDI tab is active.

If the GCode tab is active it calls the Cycle Start API. If the MDI tab is active it calls a different API (can't remember which one off the top of my head) to run your MDI command.

6
Never done this, but you can assign a register for the gauge value (in the screen editor).

Is your 0-5V from the servo connected to an analog input that is then mapped to a Mach4 analog input? In this post Steve talks a bit about the Mach4 analog inputs.

https://www.machsupport.com/forum/index.php?topic=43006.msg278800#msg278800

7
Mach4 General Discussion / Re: Initiating values from "ini file"
« on: March 30, 2022, 11:53:16 AM »
That's a good idea from Bill about using persistent registers for the DROs.

You could also try putting your function call in the PLC script instead of the screen load script. In the PLC script, towards the bottom, there's a conditional that only runs in the first loop...try it in there. Sometimes not all the screen elements have been loaded when the screen load script is called.

8
If you look in C:\Mach4Hobby\Wizards\panelscript.mcs you'll see a reference to mcLuaPanelParent - which you can call GetParent() on.

9
Quote
Like I said I was able to figure out how to create a separate window with all the necessary controls, but I was hoping to have all the information self contained in the main screen, not in separate windows.

Are you using a Lua panel (in the screen editor) for your custom controls? You can basically use any wxLua elements on the main screen if it's in a panel.

10
Mach4 General Discussion / Re: How to set up analog outputs in Mach4?
« on: February 09, 2022, 11:59:41 AM »
This thread has some useful info about the analog outputs.

https://www.machsupport.com/forum/index.php?topic=43006.msg278800#msg278800

Pages: 1 2 3 4 5 6 7 8 9 10 11 »