Applies To:
  • CitectSCADA

Summary:
I am trying to set up a system with Citect talking to a Bailey DCS via a CIU02/03 module. I have read the help but found it a little thin in some areas. How do I address Bailey variables? 

Solution:
From a standard PLC point of view, addressing any Bailey variable seems quite cryptic. There are a number of different values to get right including ring number, module number and node number. The ones that really count however are the block number and the index number. The block number corresponds to the lowest level of addressing and you must consult the program drawings for this information. Typically, Bailey function blocks have a number of different values associated with them and you must use an address suffix to get the right one most of the time.

After configuring a couple of large Citect-Bailey systems I have learned a thing or two about Bailey programming but am by no means an expert. What I am trying to say is that some of the details about Bailey programming may be a little less than accurate - don't consider them gospel.

As I mentioned earlier, one of the tricks you are required to master is the use of the Citect index number in the Bailey address. I shall point out a few hints on how to use them later in this note but I did wish to mention that the use of index numbers in the following examples is purely arbitrary.

In my experience there are two types of variable which get a lot of attention. These are Bailey digitals and analogs. To address the value of a read the loop set point from the Station block using a tag addressed as SP5950,1,20,3,610

particular DO/L (digital out to loop - FC 45) you should use the following syntax.

    D100,1,20,3,346.VAL

The .VAL suffix is essential in this case. To address the value of an AO/L (analog out to loop - FC 30) you should use the following syntax.

    A5500,1,20,3,459

Notice that no suffix is required in this case. These are the simple examples though.

Usually a PID is represented by a twin block structure - one a PID or APID function block and the other a Station block. Consider the following example where the Station block is numbered 610 and the APID is numbered 2100.

Readable (only) tags. You can....

  • read the loop control output from the Station block using a tag addressed as CO5850,1,20,3,610
  • read the loop auto status from the Station block using a tag addressed as SS234,1,20,3,610.A
  • read the loop cascade status from the Station block using a tag addressed as SS234,1,20,3,610.CRN

Writable (only) tags. You can....

  • write the loop into a particular mode using a tag addressed as SM9250,1,20,3,610
  • write the loop output using a tag addressed as WSP9050,1,20,3,610
  • write the loop set point using a tag addressed as WCO9150,1,20,3,610

Tuning (read or write but suffer a performance hit) tags. You can....

  • tune the loop gain using a tuning tag addressed as TR0,1,20,3,2100.S12
  • tune the loop integral using a tuning tag addressed as TR0,1,20,3,2100.S13
  • tune the loop derivative using a tuning tag addressed as TR0,1,20,3,2100.S14

There are a couple of other function block types which might interest you. One is the RCM which is like a switch. You can read or write to these blocks but need a separate tag for each operation. To read an RCM use a tag addressed as follows.

    RCM1200,1,20,3,179.OV

Note the .OV suffix (output value). A suffix is mandatory with this type of tag address. To set the switch you should use a tag addressed as follows.

    WRCM1200,1,20,3,179

This tag accepts an integer argument.

The REMSET is a very handy block and you may expect to find it in a Bailey program. These little babies are analog read-writable and have exception reporting.

    RMSC6152,1,20,3,1468

This tag accepts an integer argument.

Okay, now cast your eye back over all the index numbers and block numbers shown in these examples. In general the index numbers are unique but by now you would've noticed a few exceptions to this rule. The first is with those SS (Station Status) type tags. You must use the same index number for these tags, those that refer to the same block number. There are a few other possible suffixes (see the Citect help on data types). When you define a new tag with a different suffix (but the same block) you must use the same index as was used before. So, SS tags referring to the same block must also use the same index number. RCM and WRCM tags referring to the same block also share index numbers. All tuning variables require a '0' for the index number, as shown above in the 'TR' variable type examples. The same applies to 'TD' digital tuning variables.

All these examples were taken from a project which is a couple of years old and has been operational for that time. Obviously these particular addresses won't work for you unless you have the same program in your Bailey processor. Also, your ring/module/node numbers may also be different.

By the way, if you have a large project to configure, I strongly advise the use of a spreadsheet program to manage the variables table. This will allow you considerably more flexibility and automation.

Consult the Bailey 'Data Types' section in Citect's online help for more information along these lines. Also, check the hints and tips for assistance in configuring and debugging your project.

 

Keywords:
 

Attachments