LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing VI referece via Datasocket connection

Highlighted

Hi,

 

I was trying to pass "This VI" reference from one VI to another using Datasocket as in the potential future both VIs will be working as a separated EXEs.

So I have noticed that reference data for some reason can't be passed and at the output I always have empty reference.

 

Gentlmen, does anyone know if this is technically possible to pass VI refernce in this manner and the most important question, if you have your VI compiled to EXE would this VI reference stuff still be valid? Technically it is not a VI any more?

This_vi ref.jpg

Beforehand Thanks,

Rustam

 

0 Kudos
Message 1 of 11
(1,411 Views)
Highlighted

I've ever used datasocket, but I don't see why it wouldn't work with VI reference... with the same VI, have you tried to pass a different type of data? or with a control reference?

 

If indeed datasocket don't work with VI Reference you can use VIServer to share VI references between 2 applicationa, I know it work because I sometimnes use this.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 11
(1,402 Views)
Highlighted

Yes I did try another types of the data and everething works fine except the VI reference.

0 Kudos
Message 3 of 11
(1,396 Views)
Highlighted

I tried  Shared Variable and found that it doesn't allow to create variable for the VI reference too.

 

 

SharedV.jpg

0 Kudos
Message 4 of 11
(1,387 Views)
Highlighted

>>  If indeed datasocket don't work with VI Reference you can use VIServer to share VI references between 2 applicationa, I know it work because I sometimnes use this.

 

Could you give me a bit more details about how to do that, it looks like I not quite understand what you mean?

0 Kudos
Message 5 of 11
(1,371 Views)
Highlighted

see this discussion on LAVA


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 6 of 11
(1,338 Views)
Highlighted

I will, Thanks a lot!

0 Kudos
Message 7 of 11
(1,332 Views)
Highlighted

You can probably typecast the reference to an integer, and typecast back to a reference on the other end, but I doubt the reference will be valid if the sender and receiver are different executables. Normally references are valid only within the context of the application that creates the reference.

0 Kudos
Message 8 of 11
(1,310 Views)
Highlighted

Normally references are valid only within the context of the application that creates the reference.

 

That is very true, and you need to get app's ref of the VI you want to work on otherwise it won't work.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 9 of 11
(1,299 Views)
Highlighted

Well, I tried to hide VI reference inside variant or cluster but it doesn't work unfortunately, on the other side it appears corrupted.

0 Kudos
Message 10 of 11
(1,290 Views)