Hello Guest it is March 29, 2024, 11:30:02 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.


Topics - rellimmot

Pages: 1
1
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

2
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


3
So I'd like to probe for ideas and sanity checks here on my project.



Pre-TLDR/LastParagraphFirst: So the question is if faced with a dynamic limit switch distance problem, how would you implement it? Is there a clean way to implement it in the G-code where the limit switch can simply trigger a *pause*, and proceed to the next line to resume in the reverse direction after an elapsed time? Is this possible in the G-code where a limit switch can cause a break-to-next-line or through a system of subroutines? Would I need to roll a Lua script? Opinions are appreciated!

So I've got a robot with an X and Y axis in a gin that needs to push that probe shown on the end of the X axis into each cotton bale when it arrives at the weigh table. The robot is built from OpenBuilds parts, and last year we used this PlanetCNC controller that proved to be an unreliable PITA and didn't have a few G code commands implemented that I wanted. In the PlanetCNC software, limit switches could only cause E-Stops or could not resume to a next line-- so if I paused with the limit switch it'd just keep driving forward when resumed. I was able to band-aid it to work by using an Arduino to interrupt pulses to the drivers when it sensed the limit switch at the bale was pressed, and send keystrokes via AutoHotKey to the software to resume.

The problem I'll face when implementing it again with (planning on using but not yet purchased) Mach4 and a PMDX-416 SmartBOB is the same as last year, albeit I'm hoping the more robust software/hardware will allow me to more elegantly implement it.

I realize G Code does not allow if/for/while conditionals by default, or jumps on conditionals, or any of that... The thing is, I have a limit switch that is dynamically placed because the cotton bales arrive on the weigh table with about a 1ft margin of distance. I need to have the robot drive out, hit the limit switch (thus also pushing the probe into the bale), come back out, and repeat 4 times. See the video: https://www.youtube.com/watch?v=XbuhTXTsVVk
This year it will go faster due to a belt drive conversion, and it will hopefully be more reliable and not need janky band-aids due to Mach4/SmartBOB..hopefully.

Thanks.

Pages: 1