LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wind Tunnel Specimen Positioning System with Galil Controller

Solved!
Go to solution

Hello all,

So to say the least I am super frustrated with my LabVIEW program right now. This project requires that I use only LabVIEW and the GalilTools software, so I can't use C or C++ or any others. I have written out approximately what the code I need would look like in C/C++ but I am having a lot of difficulty creating a LabVIEW program that does the same thing. I have attached the VI I have written so far. I have also attached my functional diagram to aid in outside understanding of my intentions. Also attached is an OpsManual dictating the structure of my intended interface and everything it should do.
I know it's a lot to look at but I would greatly appreciate some help. I've looked all over the examples and forums and youtube tutorials and I'm just really having a hard time and this particular stage is taking too long.

 

The basics of this project is that it is a positioning system run by 2 stepper motors with specified angular limitations. All of the motor configuration is handled in the GalilTools software. All of the logic is to be handled in LabVIEW. This requires the passing of values back and forth between LabVIEW and the controller.

 

Specific things I am trying to do that are currently causing me trouble:
-return output messages as the program moves through each stage (LabVIEW can't pass multiple strings to the same terminal without other things in between, I haven't figured out a way yet)

-connect reference/error wires through program (I understand this is how the program passes values and it also affects the program flow, I am unsure how to connect mine and still have my program run as intended, also running into the issue of having mutliple wires to one terminal which LabVIEW will not do)

-emergency stop button (I need this wired in so that it can stop the program at any time, similar to the abort)

There are a lot of other issues that will present themselves as I move further but those are the current ones I have been working on. I am struggling with which structures should be used. It's just not quite as intuitive to me as C/C++ has been.


Thanks in advance for any help provided.

Download All
0 Kudos
Message 1 of 7
(3,565 Views)

If you want to try your your code in C++, then visit either

 

http://www.gpibsoftware.com/

 

-or-

 

http://www.data-acquisition-software.com/

 

either of these pages offer FREE software to control RS232,ethernet, or GPIB with standard C++.  NO gimmicks, games or email "harvesting"

 

There is even a contact page if you have problems.

0 Kudos
Message 2 of 7
(3,546 Views)

First, stop thinking about how you would do it in C++ unless you are coding in C++. LabVIEW is not nearly as primative a language as C++ so things are a lot diffrerent.

 

Next, in terms of your two specific points. I have no idea what you mean by the first one. Can you give an example of what you mean?

 

Second, it sounds like you have a basic misunderstandings about how LabVIEW works. It would probably be valuable for you to spend some time going through the tutorials. (Why in the world would you ever want to have more than one source driving a given point?)

 

Third, if you want an abort button, you will need to use an event driven interface. Just please don't call it an ESD button, since it isn't. ESD should be hardware-only unmediated by software.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 7
(3,495 Views)

The Galil controller should have an enable/disable input on it to disable the motor drives in case of an emergency. This is what your E-Stop button should ideally be wired to.

 

-AK2DM

 

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 4 of 7
(3,472 Views)

If you need an emergency stop button for your Galil project, then do not rely on software!  

 

You do not want to rely on the vagaries of software latency if there is any hint of a safety issue. (Think liability.lawyers,litigation)  Use a mechanical switch that removes power from any moving parts or heat sources.   I suggest that you use a device from Measurement computing to monitor the state of the swich.

 

See:

http://www.mccdaq.com/solutions/USB-Digital-IO.aspx

 

You can  use C++ (or LabView)  with products from measurement computing.   The applications engineers at measurement computing are very responsive to help requests.

 

 

0 Kudos
Message 5 of 7
(3,431 Views)
Solution
Accepted by topic author GypsyEngineer

A few thoughts for you to consider.

 

For the Galil side of things

  • You don't need to download your program to Galil every time, connect using Galiltools or GalilSuite and download then use the BP command to burn the program to memory.
  • Put anything in #AUTO that needs to get executed every time the controller is turned on.
  • Most operation have a complementary _cmd operand that can be queried. IE: BGA will begin motion on axis 1, MG _BGA will return 1 if still moving, or 0 if motion is complete.

 

For the LabVIEW side

  • Replace the separate case structures with one event structure. Having every case how you do now with no delay in the loop means you are running every one of those cases as fast as your program can.
  • Get rid of any calls to Galil outside of the event structure. If there is code you want to run to check status or motion, put it in the timeout case or consider another loop that will run independent of your main loop.
  • Keep in mind how wires work, data dependant means that if two wires are going into a structure or function they both must contain data before the structure or even will execute. Other than that you can bring wires where you need.

 

 

 

Message 6 of 7
(3,400 Views)

Hello 🙂

 

Thank you for taking the time to look over everything.
I am aware that Galil can burn the program in. Right now we are using 3 or 4 programs for testing and demo so it is best to make sure the one we are using is what we need. Also important since this program is not 100% complete. The operand return is definitely a help for reporting to the user and I will look into that.

I have made numerous changes since my first post, and so I have supplied a snippet of my current program. Now I seem to be having issues returning new values for the relative positions (RPA and RPB). I have also posted a second forum question to deal with this.

http://forums.ni.com/t5/LabVIEW/Shift-Register-or-Feedback-or-Other-need-to-read-in-new-value/td-p/3...

 

ProjectSnippet.png

 

Once again, thank you for your time and attention.

0 Kudos
Message 7 of 7
(3,356 Views)