Hello Guest it is April 19, 2024, 01:28:10 PM

Author Topic: VB Scrpt output  (Read 10449 times)

0 Members and 1 Guest are viewing this topic.

VB Scrpt output
« on: October 19, 2007, 05:09:18 PM »
Hi, I am from the Netherlands.

I like to make a little VB script, but I am a newbie.

Most I have doing with VB script is working, but I can't set an output.

With the command:   ActivateSignal(OUTPUT4) and DeActivateSignal(OUTPUT4) the leds in the DiagnosticScreen works fine.

But I can't find  the command for setting an outputpin, for example output#4, this for activating a relais?

Is there anybody for help?

With kindly regards

Riny Assink

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: VB Scrpt output
« Reply #1 on: October 19, 2007, 09:36:29 PM »
goto config, then ports and pins, then output signals, then set your port and pin for output4 there.

scott
fun times
Re: VB Scrpt output
« Reply #2 on: October 20, 2007, 05:41:23 AM »
Hi Scott,

Thanks, I did it and  it works fine.

Ik have much to learn, but it's greate to do it. For me also the language is not easy.


Greeting from the Netherlands.


Riny Assink

Offline Heian

*
  •  13 13
    • View Profile
Re: VB Scrpt output
« Reply #3 on: February 02, 2008, 09:40:48 PM »
Im trying to new M codes, I set M11 to ActivateSignal(OUTPUT2), M12 to DeActivateSignal(OUTPUT2) but when I type in M11 in MDI  I dont get a signal light on output 2, Output 2 in turned on in Ports and Pins, What am I Doing Wrong, M3 activates output 1, M5 deactivates output1, This is set up in Mach from the start. And is Working Fine. I need M11, M12, M21,M22, M31,M32, M41,M42, M51,M52, M61,M62,M71,M72,M81,M82, Along With a Few Others to activate a @ zone Vac System .Each M codes needs to drop a head on our Router And the Second M code Picks it up EX. M11 Head 1 Down, M21 Head 1 Up.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: VB Scrpt output
« Reply #4 on: February 03, 2008, 09:34:30 AM »
The Mcode range your speaking of, are already taken in Mach, even if you open M11 in the VB scripter and replace the code that comes with that nativly with mach with your stuff, it will not work, dont know why but that is the way it is.

If you will start all your custom M codes in a higher ranges, I.e. M800, M801, M802, M803, etc. you will find that your actvate and deactivate Mcodes will run just fine..........

Scott
fun times

Offline Heian

*
  •  13 13
    • View Profile
Re: VB Scrpt output
« Reply #5 on: February 03, 2008, 02:11:54 PM »
Yes, I found that out, I  changed the M11 to What i needed and i dident work, I tryed to add M06 Vac On , M07 Vac Off That Did not Work, Im Stuck With M111 head 1 down, M112 Head 1 Up, M211,M212 ECT. The problem i Have is that all the g code for the past 15 years has the M codes i posted before, and i dont want to have to change  all those programs. Or my post in MasterCam.  If Anybody knows how i can overcome this Please let me know.  We are converting a 8 head Heian router from a Fanuc 11 Control to Mach 3 

John

Offline Heian

*
  •  13 13
    • View Profile
Re: VB Scrpt output
« Reply #6 on: February 03, 2008, 02:16:02 PM »
I forgot to ask there is a M code List in Mach, If i cant use the m codes i need, can i edit the list so my operator will be able to see the new M Codes. Thanks  JP

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: VB Scrpt output
« Reply #7 on: February 03, 2008, 03:00:00 PM »
JP,

     Well your other choice if you want to keep those Mcodes is to open up the Old Gcode file in a text editor and do a "Find and Replace" I.e. M11 replace wth M800, it will go through and replace all instances.

Brian my have to chime in on How (and which ons), of the M codes are "Locked" into mach a certain way. I have found that certain ones like your M11, only the kinda stuff that is already in M11 will work, other stuff will not.

Sorry I couldn't help you more on this one, but you may be stuck unless you want to do some find and replace work. The issue here is within Mach itself, and only Brian and do anything about that.

Scott
fun times

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: VB Scrpt output
« Reply #8 on: February 03, 2008, 03:29:42 PM »
Do you mean this list? If so, you can create your own image amd import it to your bitmaps folder then edit your screen with screen 4 to show your personal list.

Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: VB Scrpt output
« Reply #9 on: February 05, 2008, 06:58:32 PM »
Something strange here. If you look at any of the macros that come with Mach, like M11, There is lots of Vb functions in there. Many people often edit M6Start or M6End for tool change stuff. So why cant you have an M12, or whatever you want below 100?

Is it simply a convention that users ought to stay out of the below 100 codes so they dont get trampled by some new future  Mach addition?