05-02-2017 02:31 AM
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!
05-02-2017 07:13 PM
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.
05-02-2017 08:29 PM
@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.
05-03-2017 12:40 AM
I thought no need to input any items in Enum or Enum2...and once items is on input spring,that is ok.
05-03-2017 01:08 AM
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!)
05-03-2017 01:15 AM
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!
05-03-2017 01:32 AM - edited 05-03-2017 01:33 AM