Edit functional addresses
Use this feature to add variables to addressing. You can re-use a variable by copying and pasting parts of it into other addresses, then making changes to the code for use in other tags. You will be prompted for these variables in the I/O Device Manager.
To access the Edit Functional Address screen, click Edit Functional Address for a real time tag, onboard alarm tag, control tag, or reset tag. The fields on this screen are used in this way:
- Tag Name and Original Address: These fields display from the tag you selected; you cannot edit this information.
- Device Variables: Click New to begin adding new variable properties. The following fields become live:
- Name: This name must be in format %NNN%, where NNN includes only letters or underscores.
- Description: This required field is free-form. It displays in the I/O Device Manager and will help you ensure that you have the correct information entered.
- Regular Expression: You can use one of the pre-defined expressions, or you can create your own
- Test Value: This will become the default in Citect; use it here for testing the new address.
- Help: Use this optional field to add more definition to this address. It displays in the I/O Device Manager.
- Code Body: Enter the code in C# to define the action you want to take place.
- Return: Type the return statement that you want from C# code. It might look like:
string.FormatFormat("SomeString{0}SomeOtherString", someVariable)
- Result: Click Test in the lower right corner of the screen. If there is a compile error, check your C# code. Otherwise, the result displays. Verify that it is what you wanted.