LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to invoke different constants?

Hi. I want to send different constants(t,b or c) to visa write instead of write control. The constants should be sent when i press a button in front panel.

0 Kudos
Message 1 of 5
(3,072 Views)

Hi madara,

 

simple answer: use case structure(s)…

 

Better answer: use an enum or a ring control with a case structure…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(3,058 Views)

Even better answer: Use a combo box as a control that can then be written directly into the VISA Write.  No case structure necessary.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 5
(3,038 Views)

Hi crossrulz,

 

sometimes you might not want to send a command at all, so I still suggest to use a case structure 🙂

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(3,030 Views)

GerdW wrote:  sometimes you might not want to send a command at all, so I still suggest to use a case structure 🙂

That is true.  But not in this case.  From another thread (http://forums.ni.com/t5/LabVIEW/When-highlight-execution-is-quot-ON-quot-i-get-the-output-but/m-p/32...) I know the instrument uses a command-response protocol.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 5
(3,019 Views)