LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Specific Labview .NET question

Solved!
Go to solution
Solution
Accepted by rolfk

Okay, I solved this, and it was very simple as I was expecting. I didn't find the .NET object control and indicators in the LV menu's, but eventually did and worked out how to use them. So did this:

 

>Run initialise case with .NET constructor

>Pass .NET reference out via it's indicator and through a connector to Teststand

>Store this ref as a local variable in Teststand

>Run a new step calling a different case on the VI

>Pass the reference into the .NET control, via another input connector

>Invoke node is now happy and I'm using the existing .NET object

 

On first run it's worked so should be rolling now thanks!

Message 11 of 16
(880 Views)

In TS, you will need to separate the calls into 3 steps:

1) Open Ref

2) Make .net calls

3) Close Ref

The way I passed the .net reference from step to step was by converting it to a U32 value and pass it back to TS. Your vi's in steps 2 and 3 will need to accept the U32 Ref and convert it back to a true .net reference

In LabVIEW, you will either need to write a upper level vi that mimics the TS steps, or build an entirely new vi that does not stop until you are done issuing commands.

 

EDIT: Missed it by a minute! Glad you worked it out.

 

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 12 of 16
(879 Views)

Thanks Fozen, as above your post I got this working like you said. However TS has an 'Object Reference' variable type I used specifically for this.

0 Kudos
Message 13 of 16
(873 Views)

@Tom0000 wrote:

Okay, I solved this, and it was very simple as I was expecting. I didn't find the .NET object control and indicators in the LV menu's, but eventually did and worked out how to use them. So did this:

 

>Run initialise case with .NET constructor

>Pass .NET reference out via it's indicator and through a connector to Teststand

>Store this ref as a local variable in Teststand

>Run a new step calling a different case on the VI

>Pass the reference into the .NET control, via another input connector

>Invoke node is now happy and I'm using the existing .NET object

 

On first run it's worked so should be rolling now thanks!


EDIT: +1 for posting the solution in the first place!

 

All that's left to do know is to accept the solution!

0 Kudos
Message 14 of 16
(870 Views)

Is there a solved button on here? 🙂

0 Kudos
Message 15 of 16
(866 Views)

As topic creator you should get an Accept As Solution button right besides the Reply button. I did mark your post as solution for you.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 16 of 16
(854 Views)