LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

integer to enumeration conversion - I'm being stupid

Help. I've had a mind blank.

 

I want to get an array of values out of a FOR loop from the iteration count terminal, each must be associated with an enum. (just the 1 enum).

 

I want to only select certain values for my output e.g for quick build purposes all even / all odd.

 

I'm building an array using Shift registers, but try as I might, I can't seem to convert the [I] to an enum. all I get is a U32.

I've tried converting the I32 to U32 with the node from the conversion palette and then type casting the result to the enum, but it doesn't work for me.

 

Any ideas?

 

James

(working in 8.6)

CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 1 of 25
(3,279 Views)

Is your enum already type def'ed?

 

Felix 

0 Kudos
Message 2 of 25
(3,275 Views)
Doesn't seem to make a difference if it isn't or if it is Strict type def'd (I don't use the plain type def - I find it too buggy when I update it.)
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 3 of 25
(3,271 Views)
Post your code? Or an image? I find that working graphically has gotten me thinking graphically (arguably the way we have evolved) so sometime problems textually described that I don't understand are obvious when "seen".
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 25
(3,267 Views)
Here is the code (forget if I have the enum linked or not)
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 5 of 25
(3,264 Views)
I don't quite understand your problem.  If I right-click on the shift register outside the for loop and create an indicator, I get an array of enumerations on the front panel, which I think is what you're trying to get.  By the way, you can also create an array of integers from your for loop, then typecast that array to an array of enumerations; just make sure that you're consistent about the numeric representation of the integer and the enumeration.
0 Kudos
Message 6 of 25
(3,239 Views)
Argh. It's working for me too now. It wasn't working earlier. Smiley Mad
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 7 of 25
(3,234 Views)

And what is the point of this??

 

 

Message Edited by smercurio_fc on 04-08-2010 09:13 AM
0 Kudos
Message 8 of 25
(3,224 Views)

 


smercurio_fc wrote:

And what is the point of this??

 

 

Message Edited by smercurio_fc on 04-08-2010 09:13 AM

 

It was Late. I was Tired. I feel Stooopid.

 

- Especially now I can't seem to get an array of Strict type def Enums coming out of a Sub VI to turn into a colon delimited string. Smiley Sad (and there is now Icon for bursting into tears.)

 

Where is the weekend???

Smiley Tongue
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
0 Kudos
Message 9 of 25
(3,212 Views)

James W wrote:

- Especially now I can't seem to get an array of Strict type def Enums coming out of a Sub VI to turn into a colon delimited string. Smiley Sad (and there is now Icon for bursting into tears.)

 


Array to for loop, enum to Format into string, add ';' before string if loop-I > 0. 😉

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 25
(3,207 Views)