LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW 2020 Search 1D Array not working

ok I have a weird one....

 

I am using the search 1d array primitive to search a 1d array of DAQmx channels to find the index of specific channels I need.

 

The element input I have a string input to that and of course with a coercion dot. 

 

I have checked the strings from both side by side and there are no differences, I have even tried typecasting the string to a DAQmx channel type. 

 

I am getting all -1's when I search the array.

 

The catch is, this works fine in a Windows Server 2016 deployment, however when I try to deploy this to Windows Server 2012 I am having this problem. 

 

Not sure what is going on. Any help would be appreciated. 

 

I may end up recompiling the 2020 code to an earlier version and see if that fixes it. 

 

 

Steven Howell
Controls and Instrumentation Engineer
Jacobs Technologies
NASA Johnson Space Center
0 Kudos
Message 1 of 9
(1,269 Views)

Hi StevenHowell,

 

blind guess - regional settings on Windows? What is considered coercion dot, can be on some settings ',' and on other regional settings '.' 

 

 

_______________________________________________________________

-Patrik
CLA || CTA
If it helps - Kudo it, if it answers - Mark As Solution
Message 2 of 9
(1,229 Views)

The data shown in those resources might not be the data.

 

You might have better luck if you convert the resources to string first.

0 Kudos
Message 3 of 9
(1,198 Views)

Thanks wiebe@CARYA

 

I will give that a whirl and see if I can get it to work. 

Steven Howell
Controls and Instrumentation Engineer
Jacobs Technologies
NASA Johnson Space Center
0 Kudos
Message 4 of 9
(1,168 Views)

Thank you Ajskrim,

 

I am not sure how to adjust those regional settings though. 

 

Sometime today I am going to run this same executable on my Server 2012 test VM and see if I get the same results as on the client's computer. 

Steven Howell
Controls and Instrumentation Engineer
Jacobs Technologies
NASA Johnson Space Center
0 Kudos
Message 5 of 9
(1,167 Views)

Can you post some minimum reproducible code? We can at least verify it's working or not on our end. I just tried doing a search with DAQmx channel names and strings and it works in my LV2020.

 

I suspect the . vs , regional settings may be the issue. Can you do a search using a DAQmx constant instead of a string?

0 Kudos
Message 6 of 9
(1,144 Views)

Hi StevenHowell,

 

You can find it in ControlPanel -> Region -> Additional Settings -> Decimal symbol

Ajskrim_0-1635316552191.png

 

_______________________________________________________________

-Patrik
CLA || CTA
If it helps - Kudo it, if it answers - Mark As Solution
Message 7 of 9
(1,111 Views)

Alternatively, you can turn this off in LabVIEW:

 

Regional settings.PNG

 

I'm not sure how\if this will effect VISA resources...

 

If this turns out to be the problem, expecting users to change the regional settings, or ignoring these settings in a program, is not really a solution... But it could lead to a solution.

Message 8 of 9
(1,034 Views)

wiebe@CARYA wrote:

Alternatively, you can turn this off in LabVIEW:

 

Regional settings.PNG

 


Do remember that an executable doesn't automatically have this setting!

 

So, make a MyExe.ini file in your project, and put all exe keys in there (see LaVIEW.ini for the names\values). Then add this as custom configuration file in your build script.

0 Kudos
Message 9 of 9
(1,002 Views)