Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 03:46:47 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  General Mach Discussion
| | |-+  Is this possible?
Pages: 1 2 »   Go Down
Print
Author Topic: Is this possible?  (Read 816 times)
0 Members and 1 Guest are viewing this topic.
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« on: October 17, 2010, 07:02:18 PM »

Is it possible to change a pin assignment via VB?  for instance, change the probe input for pin 11 to pin 12 using a VB script.

Thanks
Logged
BR549
Active Member

Offline Offline

Posts: 2,555


View Profile
« Reply #1 on: October 17, 2010, 09:23:35 PM »

Not directly that I know of.  What would be the purpose? It could be done indirectly.

(;-) TP
« Last Edit: October 17, 2010, 09:26:19 PM by BR549 » Logged
HimyKabibble
V4 Screen Contributor

Offline Offline

Posts: 1,347



View Profile
« Reply #2 on: October 17, 2010, 09:47:20 PM »

No, there is no way to do that.

Regards,
Ray L.
Logged

Regards,
Ray L.
Tweakie.CNC
Active Member

Offline Offline

Posts: 3,261


Super Kitty.


View Profile WWW
« Reply #3 on: October 18, 2010, 02:19:56 AM »

I have to disagree with Ray (in a nice way) because there is the probability that "everything is possible".

With regard to the question - the Probe input is Input 22 and it's pin assignment is stored in the .xml. It would not be too difficult to create a VB routine to modify the .xml (change the pin assignment) but it may need a restart for the change to take effect.

Tweakie.
Logged

Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
rrc1962
Active Member

Offline Offline

Posts: 434


View Profile
« Reply #4 on: October 18, 2010, 08:34:47 AM »

I have 2 inputs for 2 probes that do different things based on some conditional logic.  My initial thought was to just switch the pin assignment for the probe function.  I could write a probe macro and instead of using G31, just use "G01 Z-1" and in the While isMoving loop, look for a low input.  In other words, if condition 1 is met, check input 1 for low.  If condition 2 is met, check input 2.  When the input goes low, stop motion and exit while loop.

How would I check an input from a VB script?

Thanks
Logged
HimyKabibble
V4 Screen Contributor

Offline Offline

Posts: 1,347



View Profile
« Reply #5 on: October 18, 2010, 08:58:04 AM »

I have 2 inputs for 2 probes that do different things based on some conditional logic.  My initial thought was to just switch the pin assignment for the probe function.  I could write a probe macro and instead of using G31, just use "G01 Z-1" and in the While isMoving loop, look for a low input.  In other words, if condition 1 is met, check input 1 for low.  If condition 2 is met, check input 2.  When the input goes low, stop motion and exit while loop.

How would I check an input from a VB script?

Thanks

Get ready to break a lot of probes.  You have NO guarantee your VB code will be running nearly often enough to sense when the probe makes contact with any reliability at all.

Regards,
Ray L.
Logged

Regards,
Ray L.
Tweakie.CNC
Active Member

Offline Offline

Posts: 3,261


Super Kitty.


View Profile WWW
« Reply #6 on: October 18, 2010, 09:54:14 AM »

Quote
How would I check an input from a VB script?

I think you may have gone full circle here because the best way must be to use the G31. (If GetOemLED (825) = True Then.......).

Tweakie.
Logged

Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
BR549
Active Member

Offline Offline

Posts: 2,555


View Profile
« Reply #7 on: October 18, 2010, 10:15:04 AM »


2 ways to do what you need.

1. wire ALL probes in series on one set of pins. Then which ever one trips the input THAT is the active probe. Very simple logic.

2. Use a mach output signal to drive a flip flop relay to reverse the probe input between 2 probes. Call it from VB monitor the flip flop to see which is     active.  More complicated logic.

Logged
LarryL
Active Member

Offline Offline

Posts: 46


View Profile
« Reply #8 on: October 18, 2010, 10:41:04 AM »

Hey Tweakie,

Got a question for you!  Is it possible to assign a hotkey value to an external switch?

Larry
Logged
Tweakie.CNC
Active Member

Offline Offline

Posts: 3,261


Super Kitty.


View Profile WWW
« Reply #9 on: October 18, 2010, 11:00:33 AM »

Not quite sure of the question there Larry.

Do you want the hotkey to operate an external relay or something ? or do you want an external switch / button to have the same function as a hotkey ?

Tweakie.
Logged

Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.
Pages: 1 2 »   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!