Hello Guest it is April 28, 2024, 09:38:06 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 - rellimmot

Pages: 1 2 »
1
Mach4 Toolbox / Re: #var (Pound Var) parameters list docs..
« on: October 10, 2017, 12:36:33 PM »
In the RegFile plugin dialog, I opened #Variables, and manually set range #'s from the beginning til up in the 10,000's, looking for numbers relevant to what I was doing. I just happened across those two very familiar looking numbers pi and eulers in the process.

2
Craig,
I had been using mc.mcGetInstance previously and at some point I figured I'd cut one more variable off the list of things that might be going wrong and defined it as zero for testing since it usually is. I wasn't aware those were defined as constants in the program, good catch; I'll try changing those and see what happens. I think I'd seen them in someone else's code and they just stuck in my brain enough for me to unwittingly abuse them.

3
Rich,
I understand where you're coming from and I actually would if my budget allowed. I could also get away with stealing the software and nobody would notice but I got the hobby version anyways. This is an instrumentation research trial, in applying some measurement types whose use in this application has yet to leave the laboratory via hobby grade robot parts, hobby grade sensors, and a donated NIR spectrophotometer, into a willing cotton gin. I'm an undergraduate EE at a dead broke Louisiana college in an internship at a dead broke research lab; I've got no profit to gain from this other than course credit :)
I'd also be using a PLC if I had that industrial version money.

4
Craig, thanks for the mental labor on this. You certainly made a few things make a little more sense with the layout of the software. The bit about the 'superscript' being a compiled output of multiple scripts made some loosely connected puzzle pieces click together.

Among some other issues I've been working on, I still hadn't been able to get a script/Mcode/MDI triggered homing sequence fully operational. It works great in the Lua editor, but when tried in the Mach4 GUI in any manner it just doesn't work. Visual Basic debugger pointed at Mach4 shows:
Exception thrown at 0x7506B832 in Mach4GUI.exe: Microsoft C++ exception: std::out_of_range at memory location 0x189AE36C.
Exception thrown at 0x7506B832 in Mach4GUI.exe: Microsoft C++ exception: std::bad_typeid at memory location 0x189AC6DC.
when I attempt to call the function. The code for the function is as such:
function m155()
local mInst=0;
local X_AXIS=0;
local Y_AXIS=1;
local HOMED_POS=0;
mc.mcAxisDerefAll(mInst);
mc.mcAxisHome(mInst, X_AXIS);
mc.mcAxisHome(mInst, Y_AXIS);
mc.mcAxisSetMachinePos(mInst, X_AXIS, HOMED_POS);
mc.mcAxisSetMachinePos(mInst, Y_AXIS, HOMED_POS);
mc.mcAxisSetPos(mInst, X_AXIS, HOMED_POS);
mc.mcAxisSetPos(mInst, Y_AXIS, HOMED_POS);
end

I didn't use refAllHome due to a post from PMDX mentioning that sequence of events, though not entirely relevant to my situation; refAllHome shoots out the same error anyhow.
http://www.machsupport.com/forum/index.php/topic,33545.msg232937.html#msg232937

The logs from the above Lua script and of a normal refAllHome and profile are attached, if you/anyone is interested into digging into it for clues.

5
While I'm at it, if anyone knows how to perhaps control current Line # via the PMC that'd help greatly. I'm doing a little manipulation via Block Delete functions but to be able to perform things like the buttons in File Ops that'd be awesome.

6
Hello,

I've been working in the PMC Editor to utilize some of the software's PLC functionality to do a number of things, and I'd like to be able to access the current Cycle Line Number in the registry in order to trigger actions based on what line number I am on.

I'd be using the {READ REG} item in PMC to access the #Variable, but {READ REG} can only access core/global, core/inst, gRegs, iRegs, etc, everything but the #Variables. If I could set a custom global registry variable to a #Variable that could work.

Anybody have any insight for this? Thanks

7
Mach4 Toolbox / Re: #var (Pound Var) parameters list docs..
« on: September 14, 2017, 04:51:45 PM »
This list was really helpful, thank you.

Has anybody seen the variable for current G Code Line Number? Alternatively, know of a good script or direction you can point me in?

I'd like a way to access these variable numbers outside of the dialog in the software, for perhaps faster polling or search ability. I've yet to break out the debug software but I may have to in order to find if there's a good Line Number variable.


Also, #5041: Absolute X Current Position, #5042, Absolute Y Current Position (from Reference). The 5021/5022/5001/5002 are offset coordinates I believe.
Also, #3101: Pi, #3102: Eulers Number (e) :)

8
I think I've got it figured out. It took me way too long to find the script library via Operator-->Lua Script. I was looking for the file, which I still haven't found-- I'm guessing its the wx4 that is indecipherable in either VS or notepad.

So I should [hopefully] be able to trigger some customization of refallhome function via an M code.

Next I have to figure out how if and how I can stop at the home limit switches every time rather than even using a move G code in the conventional sense. I realize how counter-intuitive this is, but I'm trying to make this a limit switch referencing system that's constantly checking itself. If something happens and the steppers skip a beat over the process of weeks, I wont be there to fix it. I'll be able to remote into the computer but that only goes so far.

9
I'm trying to trigger a homing sequence (Reference All Axes) via a limit switch.

I've got a machine which takes measurements on cotton bales, and I've switched to using Mach4 (I know now that I should have used a PLC in the first place, but I wasn't aware they could be had as cheap as they are) from Planet CNC due to a whole host of issues with that controller last year.

Every time a bale passes I would like it to home to the X and Y limit switches OR maybe every interval with inactivity have it home. The reason is the robot is left alone at a cotton gin and we're 6hrs away from it, so it has to be as redundant as possible.

Anybody have a good M code routine or something which can accomplish this? I'm afraid I'm not adept enough with the software to figure it out, though I've been trying.

Here's a video to give you an idea of what the robot does https://www.youtube.com/watch?v=XbuhTXTsVVk


10
Holy crap I would have used that last year had I known it was so cheap!!! Unfortunately at this point I've got to do it with what I have.
I wanted to use what I was familiar with, and something I could pass on to the next guy since I'm leaving this place. I personally would have coded it in C with a microcontroller, but the guy I'm handing the project to would be lost.

I've been doing it with Mach4 and so far so good with dynamic limits. I'm having some errors infrequently on my PMDX SmartBOB with it killing the process when there's too many steps left past the x limit switch when it hits the bale, but I'll work that out. I wish I could make those firmware changes myself but apparently I'd need the Mach4 SDK which I don't think I can get :(
 
I ended up using G31 probing for the 'bale detecting limit switch'. If I can get the SmartBOB to play nice and reliably with that I should be good.


Pages: 1 2 »