Monday, August 5, 2019

Labview - int to enum conversion

Just started on Labview, even for simple function googling, it is hard to understand, and there is a long list to read from NI forum.

Stackoverflow help a bit, but lack of details, need to try and error.

After some trying, the conversion from int to enum is easy and it doesn't worth time googling and reading the forum.

The VI is as follow:
Type Cast need to compare 2 entry of same type.
Enum is type of U16, that why I have to change the "i" from type I32 to U16.

I did a simple conversion:
i = 0, enum = zero
i = 1, enum = one
i = 2, enum = two
i = 3, enum = three
i = 4, enum = four
i = 5, enum = five

the example is put over here - https://github.com/hayview/labview

No comments:

Post a Comment