Applies To:
  • CitectSCADA 1.00, 1.01, 1.10, 1.11, 1.20, 2.00, 2.01

Summary:
Question: How can I stop operators accidentally setting the setpoints to zero? If the cursor is on a setpoint and I have the keyboard command #### ENTER with the command SP123 = arg1. If the operator hits ENTER then the setpoint will be set to 0. 

Solution:
What is happening is that Citect is seeing a valid keyboard command with no data. Citect will convert the blank data into 0 and write it to the PLC setpoint. You can stop this from happening by using the StrToValue() function. This function will check for illegal input and if the data is invalid will halt the Cicode. So your keyboard command would look as follows:
 
Key Sequence: #### Enter
Command: SPC12 = StrToValue(Arg1);

If StrToValue finds invalid input, no data will be written to the setpoint. Note that the Cicode is halted - any other Cicode after the StrToValue() function will not execute. 


Keywords:
 

Attachments