READ AND WRITING SINGLE VALUES PROGRAMMING > PROGRAMMING TECHNIQUES >
The subroutines GetChannelValue_iNet() and SetChannelValue_iNet() are used to
read and write instruNet channels with one scalar value. They typically require 50 to
300us to execute. They contain 4 arguments that specify an instruNet channel
address, and then a value that is read or written, in engineering units. For example, if
channel {1,1,1,1} is connected to a thermocouple at 30C, then:
x = GetChannelValue_iNet(1,1,1,1,&errorCode)
will fill variable x with 30. These routines are exposed through the iNet32.DLL and
through the INET_INT.C interface file; and are documented in file INET_INT.C. An
example use of these functions in C is shown in file INET_EX3.C. Prototypes for these
two functions can be found in INET_MCS.H.
The subroutines GetFieldValue_iNet() and SetFieldValue_iNet() are are similar, and
are used to read and write fields within each channel (e.g. sensor type, filter settings,
etc). For example, the following C code would set the sensor type on channel {1,1,1,1}
to "current".