05-19-2015 01:52 PM
Hi,
It's my first message here so I hope I am doing things correctly. I tried to do some research before asking and I found a lot of good informations but right now, I seem to be stuck.
I am quite new to LabView, I did few VIs here and there but nothing really "serious". I am currently working on a LabView interface that deals with VB, Excel macros and Data extraction from Text file.
The VB program is in charge of a motor position, then, some Excel macros are used to do some measurement and the results are written in a text file that I use to plot some graphs.
The VB program I made give the window I put in the picture in the attached files. Basically, you have to enter some values in those TextBox then click on Move and the motor will move. When you click on the button Home, the motor moves back to the position "0", no need of the two TextBox. In my labview interface, I created two ComboBox that contain all the possible values for both of the TextBox of my VB program. What I would like to do, when I click on my "Measure" button on LabView that initiates the VB program, is that it can fill the two TextBox from VB with the data entered in my LabView ComboBox and then run the program, simulating a "click" on the Move button.
Right now, I found a VI (included in the attached files) that runs my VB program from LabView (I use it as a Sub-VI) but I still have to manually put the values in my VB program. My goal would be that when I click on my LabView button to start my measure, the motor moves but the VB program doesn't show up for the user to manually enter the values he wants.
I hope I was clear but if you need any clarification.
I did the the VB program myself.
I can also link the LabView interface I already created if need be.
Thanks for your help,
Baptiste
05-19-2015 02:34 PM
Hi
If you want to control VB and VBA program using LabVIEW, you may be able to control both in VBA only.
I usually control some machines from VBA, like XY stage using PLC, some Measuring Equipments by GPIB, NC milling machine, image processor.
Can I help you?
05-19-2015 03:15 PM
No need to get LabVIEW involved at all.
05-19-2015 03:19 PM
05-19-2015 03:41 PM
@Dennis_Knutson wrote:
Or no need for vb.
True, but he already has most of the program written in VBA.
Of course, if he has the time, he can certainly re-write everything in LabVIEW.
05-19-2015 09:05 PM
First, thank you for your answers.
I know that I don't need to use VB or LabView. I just want for myself to be able to use LabView to manage a program in VB, one in VBA and use data from a text file. I know I could write everything in VBA and that would get the job done. The thing is I want to get away from VBA and Excel as much as I can. In the future, the plan would be to re-write my VBA program with LabView but as of now, I just want to use LabView to manage everything. I know I don't really need it but I want to learn how to do it and have something that works.
So I would like to know if there is way to do what I wish to do, running my VB program with parameters coming from LabView.
Thanks 🙂