User manual

Register-Based Programming 113Appendix B
IOENTER(70900L, &read);
bit_number = ((long) (read) >6 & 1);
}
return 0;
}
Example: Scanning
Channels (HP-UX)
This example shows direct register programming using an E1499A (V/382)
embedded computer running HP-UX and using the SICL interface library.
/**************************************************************************
* Program to scan E1460A/68A/69A channels with a V/382 *
***************************************************************************/
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sicl.h>
#include <time.h>
#define E1460A "vxi,112"
/*Logical Address of device*/
#define BUSY 0x80
typedef unsigned short word;
typedef struct device_registers
{
word id_reg;
word devtype_reg;
word statcntl_reg;
word dummy_reg[13];
word bank0_reg;
word bank1_reg;
word bank2_reg;
word bank3_reg;
word bank4_reg;
word bank5_reg;
word bank6_reg;
word bank7_reg;
word bank99_reg;
}
DEVICE_REGISTERS;
main( )
{
INST e1460a;
int i, j, id, rly;
DEVICE_REGISTERS *dev_ptr;
char devstr[8];
ionerror(I_ERROR_EXIT);