LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Channel Units

How can one get the units and physical location from a channel configuration? I'd like to display both of these in my database. 

 

I can't comprehend why there are so many hoops to jump through for this. I simply want my GUI to show the units configured for each channel in the task thats running on a RT server. I think the RT server is the reason my workaround isn't working but the workaround is sloppy and shouldn't be necessary. Does anyone know a simple way to get the units from a channel and save it into a string?

 

Look at all this nonsense I'm going through! It's not even working and I suspect it's because I'm depending on a front panel object that is inconsistent on a RT server. When I watch the execution the results actually come out right, so that also indicates a scan order issue, but when I put the ring and reference in a flat sequence, it does not fix the issue. This does not make sense to me.

 

Even if I can get this to work, coding each task type by INT instead of name and having to use an indicator per type is just so bulky and looks awful. Please tell me there's a better way. 

 

Block DiagramBlock DiagramConvert to string indicates wrong answers.Convert to string indicates wrong answers.

0 Kudos
Message 1 of 3
(842 Views)

What about parsing the StringsAndValues property of the Ring instead?

 

Kyle97330_0-1675726246881.png

You could even delete the property node and just replace it with a constant since it would never change.

 

Message 2 of 3
(829 Views)

I just tested that out and that does get the right answer and solve the issue of having to have a front panel object. I can even leave the front panel object and not have a sequence and this still works. It must be because the text of the front panel object doesn't get updated right away. 

 

I'm going to hope someone has something simpler than all of this as surely there's a function or something basic I'm missing. Surely NI wouldn't have keep units behind so many gates... (He says knowing in all likelihood he's wrong)

0 Kudos
Message 3 of 3
(809 Views)