LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

scan from string

Solved!
Go to solution

Hi ZHH,

 

there is no data in your VI!

When you want us to check your VI you should provide typical input data: set control values to default before saving your VI!

 

Right now your enum control has NO items so ScanFromString cannot find any enum entries while scanning your input string!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 17
(1,864 Views)

Sorry, I am a beginner, don't know how to save file with default values yet.

But can you try to see if the initial input in the initial string? Don't know why can't the be transferred to Enum....

Thanks.

0 Kudos
Message 12 of 17
(1,846 Views)

@ZHH wrote:

Sorry, I am a beginner, don't know how to save file with default values yet.


Edit->Make Current Values Default

 


ZHH wrote: Don't know why can't the be transferred to Enum....

Because you have not defined any items in your enum.  Right-click on the enum and select "Edit Items".  Put the items in the list.



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 13 of 17
(1,840 Views)

I thought no need to input any items in Enum or Enum2...and once items is on input spring,that is ok.

0 Kudos
Message 14 of 17
(1,832 Views)

Hi ZHH,

 

I thought no need to input any items in Enum

No, ScanFromString works the other way around: it tries to find items in your input string that fit to any element in your enum. But: when your enum is empty ScanFromString cannot find anything in your input string fitting to your enum constant!

 

(Btw. you cannot define an enum at runtime - you have to define it at edit time!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 15 of 17
(1,829 Views)

Oh. It really took me days to work on it again and again… Some paragraph from "Chapter 3".pdf online said items of string can be transferred to enum by scan from string…

Anyway, thanks for your help. I am moving on now.

 

Good luck!

0 Kudos
Message 16 of 17
(1,830 Views)
Solution
Accepted by topic author ZHH

Hi ZHH,

 

items of string can be transferred to enum by scan from string…

Yes, sure - once you define your enums before using them!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 17 of 17
(1,826 Views)