Hello Guest it is June 25, 2019, 02:44:19 AM

Author Topic: Racking Detection with Encoders  (Read 6057 times)

0 Members and 1 Guest are viewing this topic.

Offline Hood

*
  •  25,847 25,847
  • Carnoustie, Scotland
    • View Profile
Re: Racking Detection with Encoders
« Reply #10 on: April 22, 2009, 03:12:16 AM »
As I said I know very little about VB but maybe something like this would be a start. PoppaBear (Scott Schaefer) is probably the guy to give you a help with VB.

A=GetOemDRO(29)
B=GetOemDRO(30)


If ((A+B)/2)<10Then
 DoOemButton(1003)
  MsgBox("Encoders Differ")
If ((A+B)/2)>10 Then
  DoOemButton(1003)
  MsgBox("Encoders Differ")
End If
End If


I have not tested it so its probably full of syntax errors but it may get you started.
There is a list of OEM codes at the top of the forum, it contains all of the codes for buttons, LEDs and DROs.
The macropump can be anabled on General Config page and you will need to save the VB to your macro folder for the profile you are using, you name it macropump.m1s

Hood

BClemens

*
Re: Racking Detection with Encoders
« Reply #11 on: April 22, 2009, 05:17:52 AM »
Hood, You're a wealth of good info....up to date too!

Kently,   Top menus:   'Support' - 'Tutorial Videos' - 'ArtSoft VideoTutorials' - 'Introduction to MacroPumps'  is a good place to start.....

Bill C.

Offline Hood

*
  •  25,847 25,847
  • Carnoustie, Scotland
    • View Profile
Re: Racking Detection with Encoders
« Reply #12 on: April 22, 2009, 05:26:09 AM »
Looking at what I posted above I can see right away that there would be a problem as whenever the Encoders were out of sync by the amount set (10 in this case) it would be impossible to do anything as the Stop would constantly be getting pressed. A means of disableing the code in the macropump would be needed, easy enough I would think if you made it that a User LED was needed along with the above code to be true, that way you could have a button switching the LED on and off.
 Actually it may just be as easy to do this in a Brain, the benefit is Brains are a bit faster than the macropump and no syntax to get wrong :D.

Hood

Offline Hood

*
  •  25,847 25,847
  • Carnoustie, Scotland
    • View Profile
Re: Racking Detection with Encoders
« Reply #13 on: April 22, 2009, 05:28:49 AM »
oh and my formula is all to cock as well LOL, thats what I get for typing 10 mins after I wake up. You would need to compare the DROS and if out by a set amount then fault out.

Hood
Re: Racking Detection with Encoders
« Reply #14 on: April 22, 2009, 01:25:35 PM »
Thanks to all for posting ideas. Perhaps I asked this question too soon in my learning curve. I realize when such basic questions are asked that it can be frustrating for others, especially when many things can be answered by documentation that is available. So I need to bone up on writing macros and brains and will then hopefully ask more detailed questions or actually solve it myself. Based on the feedback, it does appear that Mach will handle doing this in software which was really the basic question I wanted answered. I had hoped that this had been done before and someone could point me to a post or have the "easy" answer. I would have thought this would have been solved before. Some have gone to great lengths to mechanically eliminate the possibility of racking.

Thanks again to all!
Kent