GtDio6xConvertOpCodeToNumber

Applies To

GX5296, GX5960, File

Purpose

Converts opcode number.

Syntax

GtDio6xConvertOpCodeToNumber (cOpCode, pnNumber, pnStatus)

Parameters

Name
Type
Comments
cOpCode
CHAR
Opcode as a char
nNumber
PSHORT
Returned the number that represent an Opcode, see table below
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

This function is a utility to help the user convert raw hex valve read back from the board memory to the actual opcode.

Pin Action
Data OpCode
Hex Value
Disable Channel
'Z'
0
Collect CRC
'C'
1
Drive Low
'O'
2
Drive High
'I'
3
Repeat Previous Code
'R'
6
Invert Previous Code
'I'
7
Expect Valid Low
'L'
8
Expect Valid High
'H'
12
Expect Valid
'V'
13
Expect invalid
'B'
9
Drive Low, Expect Low
'I'
10
Drive High, Expect high
'h'
15
Drive Low, Expect high
'/'
14
Drive High, Expect Low
'\'
12

Example

The following example converts opcode hex value to its char opcode:

 

SHORT nStatus, nNumber;

 

GtDio6cConvertOpCodeToNumber ('Z', & nNumber, &nStatus);

 

See Also

GtDio6xConvertNumberToOpCode, GtDio6xGetErrorString