Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 08:33:45 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Help with Input/Output control...
Pages: 1   Go Down
Print
Author Topic: Help with Input/Output control...  (Read 665 times)
0 Members and 1 Guest are viewing this topic.
xavi
Active Member

Offline Offline

Posts: 17


View Profile
« on: December 16, 2010, 01:27:41 PM »

Dear All;

I am new on CNC machine and Mach-3. I have built a X-Y table positioner which we will be using to move antennas into predefined positions and making measurement with network analyser.  The X-Y table is to be controlled through Mach3. In practice we want to move the antenna in one position, waiting for the network analyzer to make the measurement, then moving the antenna to another position and repeat the measurement. We are thinking of having a sort of handshake protocol between Mach3 and the network analyser instrument.. so that Mach3 moves the antenna into a position and then sends a signal into the network analyser to start measurements. Once it finishes measuring, this sends a signal back into Mach3 so that it moves into the next position, and this cycle is repeated for all the positions.

The Mach3 is interfaced with DSPMC/IP controller which has lot of spare input and output ports that we can use for the communication. The problem is I am not familiar with Mach3 codes to output a signal to a port and wait for an input signal before it moves. I have read the G-code and M-code in the manual but this seems to be code related to the movement of the axis.  I appreaciate any of your suggestions.

Thanks in advance.

Xavi   
Logged
stirling
Global Moderator
*
Offline Offline

Posts: 1,190

UK


View Profile WWW
« Reply #1 on: December 17, 2010, 05:02:34 AM »

Hi Xavi

set up an input and an output in ports n pins and then

if your gcode looked something like this:

Code:
G1 X100
M666
G1 Y100
M666
G1 X0
M30

and you created a macro called M666.m1s that looked something like this:

Code:
'signal network analyser with say a 100 ms pulse
activateSignal(OUTPUT3)
sleep 100
deactivateSignal(OUTPUT3)

'here the analyser does it's thing and then activates an input pulse when it's done

While Not isActive(INPUT4) 'Mach waits for the incoming handshake from the analyser
  sleep 100
Wend

'macro ends and the next gcode commanded movement is free to go

that should get you started if I've understood your requirement correctly

Cheers

Ian
Logged
xavi
Active Member

Offline Offline

Posts: 17


View Profile
« Reply #2 on: December 17, 2010, 09:12:04 AM »

Hello Ian;

Thanks you very much for your replaying. It is what I was looking for. I will trie it up. 

Thanks

Xavi
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!