
6 - Language Dictionary
cfSetDigitalPort
Syntax
int cfSetDigitalPort(CF_HANDLE server, int data);
Description
Write data to the digital I/O port. Data must be sent as the equivalent of a
bit # | value |
01
12
24
38
bit # | value |
416
532
664
7128
bit # | value |
8256
9512
101024
112048
bit # | value |
124096
138192
1416,384
1532,768
Combine the above values to program multiple bits. For example, to set bits 3, 7, 10, and 11, send 3208 (8 + 128 + 1024 + 2048).
See Also
cfGetDigitalPort, cfGetDigitalConfig
cfSetErrorFunction
Syntax
int cfSetErrorFunction(void(*ErrorFn)(CF_HANDLE server, char *name, int errorcode));
Description
Defines an error function that will be called by other instrument functions when they detect a
A null pointer can be passed as the ErrorFn argument function, in which case the error callback mechanism is turned off.
If a library function that does not have a server handle argument returns an error; the error function will be called with the server parameter value of CF_NULL_SERVER.
Example
void report_mccd_error(CF_HANDLE server, char *name, int error)
{
printf("MCCD server returned error %d from API function %s\n", error, name);
}
main()
{
/* Initialization code not shown here. */ cfSetErrorFunction(report_mccd_error);
}
92