Hello Guest it is March 28, 2024, 07:02:52 AM

Author Topic: is possible vbscript for dobutton(23) ?  (Read 5241 times)

0 Members and 1 Guest are viewing this topic.

is possible vbscript for dobutton(23) ?
« on: September 01, 2017, 04:02:32 AM »
Hi
sorry for my bad english.
i need a equivalent code vbscript for dobutton(23) for modify the feedrate when active signal trough inductive sensor.
i need improve accuracy
is possible?
thanks

Additional Information...

After a long time, I have had to restart the cnc I made a few years ago. I am using the mach3 and I have adapted capacitive sensors on the X axis and the Y axis, I use them as a reference to position my mandrino the one Point x = 0 and = 0 that I get when I run the ref all home button.
The problem is that I need a maximum precision because I use it to mill pcb boards, I have noticed that when I stop motors, or I interrupt the program and I want to start again, when I return to give ref all home it returns in theory to the point x = 0 and = 0, but in reality there is a margin of error, so doing another pass ruined the work done.
I have come to the conclusion that when I refer to 0 with the sensors, the feedrate speed is high to have an accuracy, so I want to adapt a script that does the following:
When sensor X is detected (the sensor led lights up), stop and then move very slowly until the sensor led is turned off, the same with the Y axis.
Someone could lend me a hand with that script? I'm very stuck with the topic of macros and scripts.

« Last Edit: September 01, 2017, 06:09:11 AM by Tweakie.CNC »
Re: is possible vbscript for dobutton(23) ?
« Reply #1 on: September 07, 2017, 06:34:40 AM »
Would you recommend this to me to understand more?

Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: is possible vbscript for dobutton(23) ?
« Reply #2 on: September 07, 2017, 06:43:50 AM »
Would you recommend this to me to understand more?

@Dewlosin - I have absolutely no idea - perhaps you could explain in more detail.

Tweakie.
PEACE
Re: is possible vbscript for dobutton(23) ?
« Reply #3 on: September 19, 2018, 04:33:13 AM »
Dear Friends,
i ask if any body have an idea how to make a "Counting" of inputs trigs.

what i need is thay every time input #1 is active to increase the DRO by 1

please Note that the input trig  maybe longs 2-3 seconds but i want to count only when its change the Status( it means i cant use a loop and to check the signal "IsActive").

please its very important
thanks

Offline TPS

*
  •  2,501 2,501
    • View Profile
Re: is possible vbscript for dobutton(23) ?
« Reply #4 on: September 23, 2018, 04:12:52 AM »
something like this should work:

If IsActive(INPUT1) and (GetUserLed(2000) = false) Then
 SetOEMDro(2000,GetOEMDro(2000)+1)
End If

If IsActive(INPUT1)  Then
 SetUserLed(2000,1)
Else
 SetUserLed(2000,0)
End If

not tested, just written down
anything is possible, just try to do it.
if you find some mistakes, in my bad bavarian english,they are yours.