Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Basic and a cRIO?

Ok, so far I've completed a pretty nice project that uses a cRIO (attached). Everything is working great!

Now I would like to change one thing if possible. I would like to make the host application a Visual Basic application rather than a Labview application.
 
Is this possible using Visual Studio? Would I need to change things like the shared variable arrays?
 
Are there tutorials for this?
 
My goal is to keep the cRIO just as it is (if possible). It has an FPGA VI and a RT VI that both run automatically at startup. I would now like to build a VB6 desktop application that can access/control these. I believe I have the full LV process control package with RT, etc..
 
Any advice is greatly appreciated!
 
Jeff
0 Kudos
Message 1 of 7
(10,699 Views)
Hi Jeff,
 
This is possible with the new Measurement Studio (MS) 8.1 Professional or Enterprise edition.  MS 8.1 supports Network Variables that can communicate, via the Shared Network Variable Engine, with a LabVIEW VI.  You would not need to change the shared variable arrays. 
Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 2 of 7
(10,666 Views)

Hi Jeff,

Since I noticed you posted this question in the VB 6 forum, I wanted to also mention that the ability to communicate with shared variables in LabVIEW or LabVIEW Real-Time is only available in Visual Studio 2005 (VB .NET / C#).  Also, in an attempt to understand your use case/application a little bit more, were you looking for VB 6 functionality specifically, or general Visual Studio support?  Also, are you looking to integrate your LabVIEW cRIO code into Visual Studio because you have other developers using Visual Studio or you need the additional database, web connectivity, etc?

Thanks

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 3 of 7
(10,613 Views)
Hi Wendy,
I was looking for VB6 support specifically, only because we use it in most of our test systems.
I am not opposed to moving to VB.net if that's what it takes to work with Labview.
 
Currently, we have many test systems that use a VB6 front-end on a PC, and a PLC for the control. We would like to convert these PLCs to cRIOs to take advantage of the higher speeds, the FPGA, and the available I/O options. We would like to maintain our VB6 interface that runs on the host PC if possible, so this is why I posted here and also on the VB forum.
 
I am currently working on a cRIO that uses the serial port to control a servo motor, and a high speed input to read 4 encoders. The cRIO is perfect for this.
I do some things and then plot all four readings on a polar plot using some examples I found here. VB6 (since I've used it alot) is easier for me to work with in this regard. I have purchased OCX graphing controls (proessentials www.gigasoft.com) that do all the graphing for me and provide me with many more options than LV8 polar plots, but I've never used this type of thing with LV. Also, my supervisor has asked that we figure out how to communicate from VB to LV if this is possible, as in the application above (to replace a PLC and keep the interface.)
 
Does this make sense? To summarize, we want to be able to "drop in" a cRIO where we previously had a PLC but keep some of the front end PC code if possible. 
 
 
Jeff
 
 
0 Kudos
Message 4 of 7
(10,538 Views)
 
 
Hi Jeff,
 
You can communicate with your LabVIEW shared variable arrays using the CWDataSocket class that comes with Measurement Studio Enterprise Edition (this edition includes support for VB6). 
 
To see this in action:
 
2) Open and run the attached "Shared" LabVIEW project. 
3) Run the VB DataSocket Reader example with "psp" as the protocol (C:\Program Files\National Instruments\MeasurementStudio\VB\Samples\DataSocket).   This will appear as: 
 
 

 

Message Edited by AEDavid on 01-03-2007 06:45 PM

Cheers,

David Goldberg
National Instruments
Software R&D
Download All
0 Kudos
Message 5 of 7
(10,496 Views)
Actually, please use the zip file attached below for the Shared Variable LabVIEW Project. The first attachment does not have the shared variable included in the .lvproj file.
Cheers,

David Goldberg
National Instruments
Software R&D
0 Kudos
Message 6 of 7
(10,483 Views)

Thanks David!
I will try this right away. I purchased Component works many years ago, but now come to think of it, I think I have Measurement Studio as part of my Labview 8.2 Professional Control license.

 

Thanks again for your help. I will give this a try soon!

Jeff

0 Kudos
Message 7 of 7
(10,467 Views)