Hello Guest it is December 26, 2024, 01:09:50 PM

Author Topic: Interface between Labview and Mach3  (Read 8171 times)

0 Members and 1 Guest are viewing this topic.

Interface between Labview and Mach3
« on: May 15, 2013, 12:27:43 PM »
Hi,
I have a CNC stage which is controlled by Mach3. I need to have a feed back control of the stage depending on the current values. If the current value becomes more than a set threshold value the stage should move down and this can be done by labview. But the problem is now the stage will be controlled by both labview and mach3 which would cause conflict. Can Mach3 get the current values from labview or any other source and do the feedback by itself? Like I can use IF loops in the CNC program depending on the value obtained? How should I proceed?
Thanks in advance,
Shiv.

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Interface between Labview and Mach3
« Reply #1 on: May 16, 2013, 05:51:10 AM »
Hi Shiv,

Welcome to the forum.

Not sure just why you would want to use Labview to control the stage when Mach3 already handles Cypress Enable (VB) routines that may well accomplish your desired task. You may also want to take a look at 'Brains' as this may be the way to go.

Tweakie.

nb. Please don't make multiple postings on the same topic in different threads, it only serves to confuse and dilute the response. Thanks.  ;)
PEACE
Re: Interface between Labview and Mach3
« Reply #2 on: May 16, 2013, 08:58:54 AM »
Oops.. sorry about the multiple posts. I thought  of using labview because we already have a feedback control system based on that and I thought I could use that as a starting point for my system. I am new to all this and so I am sorry if this sounds silly. What does Cyprus enable exactly do? Will I be able to continuously monitor the current values and when it reaches the threshold move the stage down in Mach3 itself with using Labview only to get the current data from the set up?

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Interface between Labview and Mach3
« Reply #3 on: May 16, 2013, 02:59:15 PM »
I don’t know if this will be any help to you but you could perhaps check out these two topics;
http://www.machsupport.com/forum/index.php/board,64.0.html
http://www.machsupport.com/forum/index.php/board,29.0.html

There is also much information regarding Cypress Enable (VB) and also the use of macro’s in the documents section http://www.machsupport.com/documentation.php

OK, it's a lot of reading to do but I think it will show you the easiest way to read current DRO and other Mach3 data, how to perform the necessary calculations and how to act on the result.

Tweakie.
PEACE
Re: Interface between Labview and Mach3
« Reply #4 on: October 13, 2014, 01:52:14 PM »
Hi tweakie,

I am also trying to solve a similar problem. But, I am not trying to read/ get feedback.

I have multiple sections in my system being controlled by labview. I have to introduce 3 axis motion control into the system and I am planning to use Mach3 for this. It would be great if I can integrate/call Mach3 in labview so that I have only one front panel for the system.

I am using a TB6560 driver board.

Thanks in advance.

Offline Tweakie.CNC

*
  • *
  •  9,279 9,279
  • Super Kitty
Re: Interface between Labview and Mach3
« Reply #5 on: October 14, 2014, 01:43:29 AM »
Hi Yash,

The TB6560 boards do have their own problems and many people have failed to use them successfully so you may be off to a shaky start to begin with.  :'(

As I have recently discovered it is difficult to accurately control Mach3 from an external processor, however, Mach3 does have the functions 'single block' mode (which will run one line of Gcode at a time) and the 'program safety lockout' (which will halt motion, usually at the end of the current line of Gcode). Both of these functions will operate from an external source but you may need to synchronize system clocks.
Information on this is, to a certain extent, contained in the Mach3 documentation so it looks like you may have a bit of reading to do.  ;)

Good fortune with your project.

Tweakie.
PEACE
Re: Interface between Labview and Mach3
« Reply #6 on: October 27, 2014, 04:12:02 PM »
Thanks a lot for the info.

I have found code for MachRemote app on the downloads page. I think I can work around that.