LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read User1 switch from RT at cRio-9047

Solved!
Go to solution

Hi,

I try to read the state of "User1" button located on the cRIO-9047.

For other RT targets i have used "RT Read Switch.vi" found in NI_real-Time Target Support.lvlib.

 

But now when i using the same code i get Error code -1.

 

So my question is, how do i read the User1 switch state [on or off] from my RT target?

0 Kudos
Message 1 of 3
(67 Views)
Solution
Accepted by topic author tokar

Found this and modified it to work.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kGMoSAM&l=sv-SE

 

Seems like my cRIO-9047 dont have all System Hardware functionality.

So i only using the first value witch is the User1 swtich state.

It works, but maybe someone can share other solutions, please do.

 

Userswitch1 cRIO-9047.png

 

 

 

0 Kudos
Message 2 of 3
(30 Views)

Hi tokar,

 

instead of using ArraySubset to get a subset of exactly one element you could use IndexArray instead!

Then you also don't need the FOR loop and the IndexArray after the loop…

Best regards,
GerdW


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