Hello Guest it is October 15, 2021, 09:47:02 PM

Author Topic: Is this possible?  (Read 6350 times)

0 Members and 1 Guest are viewing this topic.

Is this possible?
« on: October 17, 2010, 08: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

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Is this possible?
« Reply #1 on: October 17, 2010, 10: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, 10:26:19 PM by BR549 »
Re: Is this possible?
« Reply #2 on: October 17, 2010, 10:47:20 PM »
No, there is no way to do that.

Regards,
Ray L.
Regards,
Ray L.

Offline Tweakie.CNC

*
  • *
  •  8,828 8,828
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Is this possible?
« Reply #3 on: October 18, 2010, 03: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.
KEEP SAFE !
Re: Is this possible?
« Reply #4 on: October 18, 2010, 09: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
Re: Is this possible?
« Reply #5 on: October 18, 2010, 09: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.
Regards,
Ray L.

Offline Tweakie.CNC

*
  • *
  •  8,828 8,828
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Is this possible?
« Reply #6 on: October 18, 2010, 10: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.
KEEP SAFE !

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Is this possible?
« Reply #7 on: October 18, 2010, 11: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.

Re: Is this possible?
« Reply #8 on: October 18, 2010, 11:41:04 AM »
Hey Tweakie,

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

Larry

Offline Tweakie.CNC

*
  • *
  •  8,828 8,828
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: Is this possible?
« Reply #9 on: October 18, 2010, 12:00:33 PM »
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.
KEEP SAFE !