DASYLab

cancel
Showing results for 
Search instead for 
Did you mean: 

Dasylab doesn’t evaluate the equivalency of strings

Dear friends.

I would like to ask you for help. I need evaluate formula at variables at section calculate expression automatically. The formula is ${STR_51}="No Error!".  Previously the Dasylab has no problem and evaluated it, correctly (1 if STR_51}="No Error!" and 0 when not). But now it doesn’t work. It is always 0 and when I check the formula and try to set the formula again, the message “Error in expression: Unknown or incomplete function” is done. I tested to try similar formula from help: StrSel("berta" = "Berta","true","false"), but the same error message is obtained. I don’t know. It is DasyLab bug or I made elsewhere some mistakes.

 

0 Kudos
Message 1 of 10
(6,673 Views)

Whisch version are you corrently running?

Tom Rizzo
InSyS Corp.
www.insyscorp.com
Your DASYLab integrator
0 Kudos
Message 2 of 10
(6,672 Views)

Version 12

0 Kudos
Message 3 of 10
(6,670 Views)

This is the correct expression if you using it in a variable

 strval(StrSel("berta" = "berta","1","0"))

 

StrVal will return the cuntent of true or false as numeric.  Make sure the result is a numeric value and not text

Tom Rizzo
InSyS Corp.
www.insyscorp.com
Your DASYLab integrator
0 Kudos
Message 4 of 10
(6,667 Views)

You are right, it should be  strval(StrSel("berta" = "berta","1","0")) at variables or my formula StrSel("berta" = "berta","true","false") at strings, but time to time it stops work at my worksheet. I don’t know when it starts neither why. All other formulas work but this one when the equivalency of strings is checked doesn’t works. Sometime the Dasylab later stop working sometime not and it is necessary to restart it.

0 Kudos
Message 5 of 10
(6,661 Views)

I am not really aware why it would or would not work.  Did you try to install teh newest V12 release?

I have to say that we develop very complex application using hundred of variables and strings but we never came about this problem.

Wht are you using this kind of string?

 

Tom Rizzo
InSyS Corp.
www.insyscorp.com
Your DASYLab integrator
0 Kudos
Message 6 of 10
(6,659 Views)

I understand that it should work, but it doesn’t. I am sending you the printscreen of screens with mistake (Picture 1) and info with version of Dasylab (Pictures 2-3) as well. May be, it can help, where the mistake is.

I use this string to evaluate that no error from equipment - stirrer is received. The stirrer sends this string if no problem is with. I have avoided this particular problem: I set one Dasylab string with "No Error!" and then compare two Dasylab strings. Now the formula is ${STR_51$={STR_52} instead of the previous formula ${STR_51}="No Error!".  It helps but I don’t know how many similar mistakes like this one is at my worksheet. This mistake was easy to find, because when the result of formula was 0 it means there is some problem with stirrer, the stirrer was switched off with DasyLab and I searched why.

 It is not the only one strange behaving of my DasyLab. I also observed mistake at setting variables using the action module. When the number of the variable at action module is set usage submenu, the number of variable is set at format with curly brackets and dollar symbol for instance ${VAR_5} instead only number 5. The Overview of variables and strings take so defined variable into account of defined variables but the action usually doesn’t set the variable correctly (Pictures 4-6). Even worse once I observed, that the setting value is set to different value number (the value of the variable named JUL_V112 $ (on DasyLab location 112 variable) was set for DasyLab location 2 variable). This situation was observed repeatedly one day with several different values of variable. Later I found that it is necessary to omit curly brackets and dollar symbol. Now when I have tested do it again, the value is written nowhere. Yes, it is the better but according me it is a bug of Dasylab.

0 Kudos
Message 7 of 10
(6,640 Views)

I am getting a litle confused.

 

If you want Var 53 to be =5 when "No Erro!" is in the string 51, the formula is as follow

strval (StrSel(${STR_51} = "No Error!","5","0") )

 

The exanple you showed in Pic1 never worked to my knowledge.

 

ALso the problem in the action list is a known one an we just live with.  🙂  Maybe you should talk to your local rep and complain.

 

So, now if you could try to explain what are you trying to achieve, we can try to help you

 

 

Tom Rizzo
InSyS Corp.
www.insyscorp.com
Your DASYLab integrator
0 Kudos
Message 8 of 10
(6,635 Views)

I don’t understand  why the formula (${STR_51} = "No Error!")*5 is worse than your formula strval (StrSel(${STR_51} = "No Error!","5","0") ).

According me it should give the same results. When I use your formula at the time period when also my formula induce previously mentioned mistake the same mistake message appears (see attachment). It is necessary to restart DasyLab and formulas start again works correctly. CJ_Butler__DAS… recomended me to use this syntax (question RS232 data format,08-02-2013 07:54) for solving transfer ASCI letter to numbers. I use the formula (${STR_16}="I")*73+ (${STR_16}="P")*80+(${STR_16}="S")*83+(${STR_16}="T")*84+(${STR_16}="U")*85+(${STR_16}="W")*87+(${STR_16}="X")*88. All formulas worked but after some time of running it stop work...  Smiley Frustrated


I am trying to achieve stabile SW. Doesn’t matter with which formula, but till now both stop work. Due to this I think there is some other problem (no with syntax of formulas).

0 Kudos
Message 9 of 10
(6,588 Views)

Bob,

 

It does sound like something is going on... 

 

I did review our CAR database, and I don't see many problems logged against the Global Strings and variables.

 

I created the string that you show, and it doesn't give me any errors. The problem may be associated with the underlying mechanisms, and related to how many strings and variables are defined and how many have formulas. 

 

Let me look into it.

Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.
0 Kudos
Message 10 of 10
(6,581 Views)