Hello Guest it is May 21, 2019, 07:18:16 PM

Author Topic: output question  (Read 2586 times)

0 Members and 1 Guest are viewing this topic.

output question
« on: July 01, 2008, 07:16:33 AM »
Can anyone help me with an output signal question?  How do I configure an output signal that is pulled high or low when the Mach 3 has completed its program.  In other words, it signals a PLC that it has completed its work.  Thanks.

Matt

Offline Hood

*
  •  25,811 25,811
  • Carnoustie, Scotland
    • View Profile
Re: output question
« Reply #1 on: July 01, 2008, 08:24:43 AM »
You could write a macro and have that at the end of your code, eg write a macro and call it M222.m1s and place it in the macro folder for the profile you are using. Then if you put M222 in your code it will do that output.
The line in the macro to set a modbus output would be as simple as
Call SetModOutput (1,1) where the first 1 is the modbus output and the second is to make it active.
Hood

Offline poppabear

*
  • *
  •  2,231 2,231
  • Briceville, TN, USA
    • View Profile
    • S S Systems, LLC
Re: output question
« Reply #2 on: July 01, 2008, 11:16:20 AM »
If your writing to a PLC, as Hood said below, you will also have to put some kind of Macro to turn that signal off, other wize it will stay up, unless told other wise. You can put another macro to turn it off at the beginning of your part run

you could also use brians on your modbus as well
Commercial Mach3 & Mach 4, Design/Build/Retrofit CNC and Industrial machines.
http://www.ss-systems-llc.com/

Offline jimpinder

*
  •  1,233 1,233
  • Wakefield, West Yorks, UK
    • View Profile
Re: output question
« Reply #3 on: July 01, 2008, 11:23:21 AM »
To follow on from Hood - I would say yes -

write the Macro - if you name it M300 - so it is easy to remember (as opposed to M30) and then make the first line of the script set your output pin, and make the second line call M30.
Not me driving the engine - I'm better looking.

Offline Hood

*
  •  25,811 25,811
  • Carnoustie, Scotland
    • View Profile
Re: output question
« Reply #4 on: July 01, 2008, 01:08:45 PM »
Depends what the output is doing in the PLC, if it just needs to be active for say 1 second then I think you could put this in your macro.


Call SetModOutput (1,1)
Code "G4P1"
Call SetModOutput (1,0)

Offline Hood

*
  •  25,811 25,811
  • Carnoustie, Scotland
    • View Profile
Re: output question
« Reply #5 on: July 01, 2008, 04:13:34 PM »
Scott has pointed out that there should be a
While IsMoving ()
Wend


after the
Code "G4P1"

That is why it takes me so long to do VB, I do it so infrequently that i forget how I did it the last time :D
Hood
« Last Edit: July 02, 2008, 03:36:03 AM by Hood »