Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 11:47:29 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  thc in macropump
Pages: 1   Go Down
Print
Author Topic: thc in macropump  (Read 491 times)
0 Members and 1 Guest are viewing this topic.
moorea21
Active Member

Offline Offline

Posts: 88


View Profile
« on: September 27, 2010, 11:46:07 AM »

Hi,

I'm using my Z axis to drive a dispensing pump (as in my previous posts.) The pump's pressure (ie whether the Z axis advances or not) will be regulated by a logic on/off signal from a strain gauge/amp/comparator circuit. The circuit appears to work fine as a spice model, parts are on order for the circuit itself, so all's well there, barring signal to noise ratio problems.

I'm hoping to run a macropump to control this using DTHC. So the macro will keep the dispensing pump at optimum pressure whenever mach is running, by doing a 'THC down' whenever the pressure drops off a bit.

Trouble is, beyond defining this as rather fluffy pseudocode, I'm unclear about what the code might look like. I don't want to confuse myself further by looking at the wrong macros for inspiration.

Can anyone suggest a bit of code that already exists that might do some/all of what I need? My code understanding is not fantastic, but hopefully I could see how it works. Then me/my friend who enjoys programming/ can put something together that does the job!

Thanks,

Richard B
Logged
BR549
Active Member

Offline Offline

Posts: 2,555


View Profile
« Reply #1 on: September 27, 2010, 09:09:50 PM »

You might want to look at the  Mach  THC plugin. 

(;-) TP
Logged
moorea21
Active Member

Offline Offline

Posts: 88


View Profile
« Reply #2 on: September 28, 2010, 02:42:07 AM »

If you mean the one by Brian Barker, I believe this is for analogue inputs. Mine is digital input, and I was under the impression that Mach 3 already has DTHC built in, so wouldn't need a plugin. Do you know where any code for running THC exists?

Something like

(-macropump-)
If Mach on then
If sensor input = 1 then THC down
Else if tool change macro is running then THC up
Else if do nothing
End

This is just pseudo code sketch.

Does something like this exist in useable form?

Not sure where to look!

Rich B
Logged
BR549
Active Member

Offline Offline

Posts: 2,555


View Profile
« Reply #3 on: September 28, 2010, 08:35:04 PM »

I think you should be able to just map the 2 signals as inputs directly to the thcup  and thcdown functions in config. Maybe NO code needed

Just a thought, (;-) TP
Logged
moorea21
Active Member

Offline Offline

Posts: 88


View Profile
« Reply #4 on: September 29, 2010, 04:37:02 AM »

That's what I was starting to think, then I thought 'can it really be that simple?' I could dummy up a logic on/off signal, set it all up, and see...

Will keep you posted

Rich B
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!