Hello Guest it is March 28, 2024, 08:39:59 PM

Author Topic: Triggering Pokey Output Signal from Mcode  (Read 4672 times)

0 Members and 1 Guest are viewing this topic.

Triggering Pokey Output Signal from Mcode
« on: January 06, 2011, 04:44:08 PM »
I am new to using Pokey and I am trying to send output signals from Pokey55 to PsExtBusRE (eight relay board from cnc4PC) and three other PoExtBusOC also hooked up to the Pokey55.
This gives me a total of 36 outputs that I would like to be able to call from the Gcode  by using user defined Mcodes.

I have installed the latest Pokey software and firmware and I am able to turn relays on and off from Mach3 Pokey tab...

now comes the next step which is creating a bit of VB script to trigger the outputs from an Mcode that will be inserted manually in the Gcode.

I have watched the video tutorials and searched around on the forum, but I am having a hard time finding examples of this.  Here are a few screen shots of what I am working with... and my very novice approach to a VB script that isn't working at the moment.

Any help or direction as to where to read up on this type of thing is greatly appreciated.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Triggering Pokey Output Signal from Mcode
« Reply #1 on: January 06, 2011, 09:07:36 PM »
pic a range,
i.e. ULED2001 is Pin1,

in the macro

'm####.m1s

If GetUserLED(2001) then
what ever you want to do code here
end if

scott
fun times
Re: Triggering Pokey Output Signal from Mcode
« Reply #2 on: January 07, 2011, 12:53:16 AM »
I think I should explain more about what I would like to do... as I think my original question was misleading.
The Pokey is really just being used for simple High or Low outputs  that will then be used to trigger logic that is programmed into an Arduino board...  Does that mean the Pokey is a "slave"?  Either way, I know it may seem weird to go about something with Mach like this, but for the specifics of my project it makes sense... trust me:)  It has to do with the Arduino's capability to interact directly with a piece of 3D software that I am using.

So all I need to do is get an Mcode that can cause the Pokey to switch a output to High, then another Mcode to turn the output to Low.

these signals will be "read" by the arduino that will trigger other things (ie., relays, mosfet)


Scott, does the above information change your suggestion at all?  or do I still need to pick a range? or have I managed to confuse everyone by rambling?

Any advice is welcome... this forum is awesome.
Re: Triggering Pokey Output Signal from Mcode
« Reply #3 on: January 07, 2011, 12:54:26 AM »
Scott,
I forgot to thank you while I was typing my response :)