LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to know if a wire is connected to a control (in the case of subVI)?

Solved!
Go to solution

Adding to my previous...

 

I am an old man that taught himself to program in machine languages* and have climbed through software gradually moving to more and more abstract versions. Over time I have subjected myself to many changes to the way I think about code. It is taking me some time but I am getting close to "seeing" LVOOP in the context of the And-Gates and OR-Gates that comprise my mental image of the code I develop. That statement may not make much sense to those out there that started out programming using an editor to produce files that can be compiled and linked. Just think of it like "Ben has has an extra Platform Abstraction Layer that has to be adapted to the new developement environment.".

 

But thank you!

 

I'll keep trying.

 

Ben

 

* In 1988 I converted from "012737" = Move the data in the location following this instruction to the loaction pointed to by by the location that follows that

to

mov R7, @R7

 

PDP-11 instruction set equivelant of a wire in LV. Smiley Tongue

Message Edited by Ben on 05-05-2009 08:29 AM
Message Edited by Ben on 05-05-2009 08:30 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 30
(2,727 Views)
Solution
Accepted by topic author R0b1n

Hi Rob,

 

"OR

- Do I test control defaults values and determine if a wire is connected ?"

 

Yes, that's the way to go. You set a default value for the control in question (any unreasonable value will do...). In the vi you check for the default value. When the value is different, a wire is connected in the main vi...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 30
(2,713 Views)

Interesting post, but not necessarily germane to the discussion.  It was about multi-element queues, not single-element queues, so there is a memory management component thrown in.  I have not benchmarked single-element queues vs. action engines in a parallel environment.  My benchmarks were all single-threaded.  Multi-threading would be an interesting test. I will have to think about that when I update the data for LabVIEW 2009 (it is looking very good so far!).

 

As a side note, you can use the Windows tick counter to get sub-microsecond resolution in timing on Windows.  You have to run a few times and take the shortest measurement to ensure that nothing else happens between your timers.  If your time is over one OS slice time, you have to be really careful.

Message 13 of 30
(2,693 Views)
Gee, Ben, you must have been really behind the times.  We moved from PDP-11 assembly to DECUS C about 1985 Smiley Very Happy
0 Kudos
Message 14 of 30
(2,690 Views)

DFGray wrote:
Gee, Ben, you must have been really behind the times.  We moved from PDP-11 assembly to DECUS C about 1985 Smiley Very Happy

 

I hope this was a joke. Because the need for assembly language will first die, then the last CPU in the world is destroyed. Assembly language has specific niche uses where it is important. Assembly language is still taught in most Computer Science and Electronic Engineering programs. Although few programmers today regularly work with assembly language as a tool, the underlying concepts remain very important. Having some basic assembly will make a far better programmer. In sharp contrast to say the Express VI concept which only contributing to stupidity among programmersSmiley Wink 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 15 of 30
(2,678 Views)

Coq rouge wrote:

DFGray wrote:
Gee, Ben, you must have been really behind the times.  We moved from PDP-11 assembly to DECUS C about 1985 Smiley Very Happy

 

I hope this was a joke. Because the need for assembly language will first die, then the last CPU in the world is destroyed. Assembly language has specific niche uses where it is important. Assembly language is still taught in most Computer Science and Electronic Engineering programs. Although few programmers today regularly work with assembly language as a tool, the underlying concepts remain very important. Having some basic assembly will make a far better programmer. In sharp contrast to say the Express VI concept which only contributing to stupidity among programmersSmiley Wink 


Well put Coq rouge!

 

There is nothing like writting a kernal mode driver where you have to declare which registers in your CPU you will use to give you a solid memory-centric way of looking at an application. BTW the code I posted early is actually an machine code version of a U16 diagram constant (how did Y'all let me get away with that one? Smiley Wink ).

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 16 of 30
(2,665 Views)

Maybe thro' LV scripting there would some option to tell/get the info directly, I think...

 

It is hightime NI releases some of these kind of hidden features thro' properties/methods openly to the developers.

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 17 of 30
(2,628 Views)

parthabe wrote:

Maybe thro' LV scripting there would some option to tell/get the info directly, I think...

 

It is hightime NI releases some of these kind of hidden features thro' properties/methods openly to the developers.


 

I agree!

 

If we all keep repeating "Legalize Scripting" often enough it just may happen.

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 18 of 30
(2,602 Views)

Oh, I've a concrete and simple case, with Functional Variables 😃

 

See below:

ma VGF 

 

Now, to use it to read or to set the value, I must wire the input "Action": read or write (Lecture and Ecriture).

 

But, in a simple VI like this one, it's evident than when I put a wire on the "Regl Cam: Nouvelle Valeur" input, I want to set a new value. And when I put a wire in the "regl cam: valeur actuelle" output, it is to read the data.

 

So, I answer to the person who asked me why I want to know if a wire is connected, you have a concrete example 😄

 

But, I read this topic, and the only solution is to put an illégal value in input, so ... Why LV doesn't purpose this feature? It would be useful, isn't it ?

 

Rob

0 Kudos
Message 19 of 30
(2,584 Views)

Hi Rob,

 

I believe it was in myAction Engine Nugget thread that Jim Kring described using a wrapper for each action.

 

This image illustrates the idea in action (pun intended Smiley Tongue )

 

 

Ben

Message Edited by Ben on 05-07-2009 08:40 AM
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 20 of 30
(2,580 Views)