Script advise for xPDisplay on a b3 controller in StruxureWare Building Operation

Issue

Script advise for xPDisplay on a b3 controller in StruxureWare Building Operation

Product Line

SmartStruxure Solution

Environment

StruxureWare Building Operation b3 xP Display

Cause

Binding to Object LCDAnswerString directly via "String Input" or "String Output" in a script program

Then doing a check 
- If LCDAnswerString <> ""  then
causes the script to disable with errors.

"" = Null

Resolution

A simple way around this is to do the script check on another (manually created) string that is bound to the object LCDAnswerString
Thus the following will work:


 Numeric Input LCDKeyStroke       'bind to LCDKeyStroke             -  this can also be used to set to zero. eg. LCDKeyStroke = 0
String Input LCDAnswerStrCopy   'bind eg LCDAnswerStrCopy  - use this to read the LCDAnswerString value
String Output LCDAnswerString    'LCDAnswerString                    - use this to set to Null eg. LCDAnswerString = ""
Numeric Output AAA


Line Wait4Value
If LCDAnswerStrCopy <> "" then  'check if a value has been input
   AAA = minimum(maximum(0, StrToNum(LCDAnswerStrCopy)), 100) 'Make AAA equal the input (min0, max100)
   LCDAnswerString = ""     'reset LCDAnswerString back to Null
Endif


  

Outside this script, the manually created string object LCDAnswerStrCopy needs to be bound to LCDAnswerString, this can be achieved directly (change the binding type to COV) or via another script (use Print LCDAnswerString to LCDAnswerStringCopy)