04-14-2015 05:33 PM
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.
Solved! Go to Solution.
04-14-2015 08:09 PM
If you want to try your your code in C++, then visit either
-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.
04-15-2015 09:25 AM
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...
04-15-2015 02:16 PM
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
04-17-2015 07:41 PM
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.
04-18-2015 10:44 AM - edited 04-18-2015 10:45 AM
A few thoughts for you to consider.
For the Galil side of things
For the LabVIEW side
04-22-2015 03:50 PM
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.
Once again, thank you for your time and attention.