Create Channel

Use the Project > Scripting > Create Channel menu option (NEWCHAN GX) to create a new channel in a database.

Create Channel dialog options

Channel name

Specify name of the new channel.

Script Parameter: NEWCHAN.NAME

Data type

Select the channel data type.

Script Parameter: NEWCHAN.DTYPE

Channel size (if string Data type) 

Specify the size of the string type channel

(default = 10).

Format

Channel format:

  • Normal

  • Exponent

  • Time

  • Date

  • Geographic

  • Sigdigit

  • Hexidecimal

Script Parameter: NEWCHAN.FORMAT

Display width

Width of channel to display (default = 10)

Script Parameter: NEWCHAN.DISPWIDTH

Digits to display

Number of decimals to display (default = 2)

Script Parameter: NEWCHAN.DISPDIG

Number of array elements

Specify the number of array

elements (default = 1)

Script Parameter: NEWCHAN.ARRAYSIZE

Application Notes

The Data type parameter must be one of:

  • Byte

  • UShort, (unsigned integer)

  • Short,(signed integers)

  • Long

  • Float, (real numbers)

  • Double (default setting)

  • String (characters)

The Display width parameter will set the channel width only when the data type selected is String.

The Digits to display parameter controls the total number of digits display (both right and left of decimal point combined). If the value is greater than the DISPWIDTH value, then data in the channel is displayed as a '**' since it cannot totally fit in the width of the display.

The Number of array elements parameter will set the channel array size. The default is 1, i.e. non-array channel.

  • When a new channel is created it will appear to contain dummy values even though it contains no data.