Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
SIMULATION 2 DRIVER
Version 5.5
January 2012
All rights reserved. No part of this publication may be reproduced in any form or by any electronic or mechanical
means, including photocopying and recording, without permission in writing from GE Intelligent Platforms, Inc.
Notice
2010 GE Intelligent Platforms, Inc. All rights reserved. *Trademark of GE Intelligent Platforms, Inc.
Microsoft is a registered trademark of Microsoft Corporation, in the United States and/or other countries.
All other brands or names are property of their respective holders.
We want to hear from you. If you have comments, questions, or suggestions about our documentation, send them to the
following email address:
doc@ge.com
Table of Contents
About This Guide ..............................................................................................................................1
SM2 Driver Features ........................................................................................................................1
Accessing SM2 Registers.................................................................................................................3
Generating Bad Data........................................................................................................................3
Using the SM2 C API........................................................................................................................4
Example........................................................................................................................................4
Understanding Alarm Statuses.........................................................................................................8
Index ...............................................................................................................................................13
iii
Provide a matrix of addresses that database blocks can read from and write to.
However, the SM2 driver differs from the SIM driver in several important ways:
Simulation 2 Driver
Obviously, you can use the SIM driver for many of the same tasks as the SM2 driver. However, you
Simulation 2 Driver
may prefer to use the SM2 driver when one or more of the following conditions occur:
You have more test data than the SIM driver can hold.
2.
Analog Examples
Digital Examples
Text Examples
1000
5000:10
2000
16435
23:15
10000
Simulation 2 Driver
Example
Suppose you are using the SM2 driver to store data from a legacy system. Using the C API and a
number of preconfigured analog blocks, you can extract your data from the legacy system and store it
in your process database.
C API Functions
Syntax
UINT16 GetAnalog(UINT16
index, FLOAT *data);
UINT16 SetAnalog(UINT16
index, FLOAT data);
Simulation 2 Driver
C API Functions
Syntax
UINT16 GetDouble(UINT16
index, DOUBLE *data);
UINT16 SetDouble(UINT16
index, DOUBLE data);
UINT16 GetDigital(UINT16
index, UINT16 *data);
UINT16 SetDigital(UINT16
index, UINT16 data);
Simulation 2 Driver
C API Functions
Syntax
UINT16 SetDigitalEx(UINT
index, UINT16 data, UINT16
mask)
UINT16
GetCommError(UINT16
*data);
UINT16
SetCommError(UINT16
data);
UINT16
GetAnalogAlarm(UINT16
index, INT16 *alm);
Simulation 2 Driver
C API Functions
Syntax
UINT16
SetDigitalAlarm(UINT16
index, INT16 alm);
UINT16
GetDigitalAlarm(UINT16
index, INT16 *alm);
UINT16 SetText(UINT16
index, char *data, int size)
UINT16 GetText(UINT16
index, char *data, int size)
UINT16
SetTextAlarm(UINT16 index,
INT16 alm)
Simulation 2 Driver
C API Functions
Syntax
UINT16
GetTextAlarm(UINT16 index
INT16 alm)
Severity
Alarm Status
Description
16
(highest)
IA_COMM
16
(highest)
IA_IOF
16
(highest)
IA_OCD
Open circuit.
16
(highest)
IA_URNG
16
(highest)
IA_ORNG
16
(highest)
IA_RANG
Simulation 2 Driver
Severity
Alarm Status
Description
16
(highest)
IA_DEVICE
Device failure.
16
(highest)
IA_STATION
Station failure.
16
(highest)
IA_ACCESS
16
(highest)
IA_NODATA
16
(highest)
IA_NOXDATA
16
(highest)
IA_MANL
IA_FLT
IA_ERROR
IA_ANY
IA_NEW
IA_HIHI
IA_LOLO
IA_COS
Change of state.
IA_CFN
IA_TIME
Time-out alarm.
IA_SQL_LOG
IA_HI
Simulation 2 Driver
Severity
Alarm Status
Description
IA_LO
IA_RATE
IA_SQL_CMD
IA_DEV
IA_DATA_MATCH
IA_FIELD_READ
IA_FIELD_WRITE
IA_DSAB
Alarms disabled.
0 (lowest)
IA_OK
10
Severity
Alarm Status
Description
16 (highest)
IA_COMM
IA_HIHI
IA_LOLO
IA_CFN
IA_HI
IA_LO
IA_RATE
IA_DEV
Simulation 2 Driver
0 (lowest)
IA_OK
Using the preceding tables, you can see that if a driver returns a HIHI alarm to a block that is in HI
alarm, iFIX or FIX changes the alarm state to HIHI because the driver alarm is more severe. However,
if the alarms are of equal severity, iFIX or FIX does not change the alarm state of the block. For
example, if the block is in HI alarm and the driver returns a LO alarm, the block's alarm state does not
change because both alarms have equal severity. Once an operator acknowledges the HI alarm, iFIX or
FIX changes the block's alarm state.
NOTE: If you set a communication error to the S register with the SetCommError function, then all
SM2 registers show a COMM alarm status. When examining the alarm status of text, only the status of
the first character (byte) is read. You can control the alarm status functions of the SM2 driver using its
C API only. Refer more information about this API, refer to the Using the SM2 C API section.
11
Index
A
latched data.................................................1, 3, 4
addresses.............................................................3
S register............................................................ 3
analog blocks..................................................1, 4
C API..................................................................4
SM2 driver
communication errors.........................................3
addresses........................................................ 3
C API ............................................................. 4
features .......................................................... 1
SM2 driver......................................................... 1
features ...............................................................1
SM2 features...................................................... 1
text blocks...................................................... 1, 4
13