EasyManua.ls Logo

Labsphere SC-5500 - Appendix C Sample Programming; IEEE-488 Programming in C++

Labsphere SC-5500
44 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
SX-01635-000, Rev. 5 31
Appendix C Sample Programming
SC-5500 programming examples are provided here for controlling the system through IEEE-488
and RS-232C interfaces. The IEEE-488 examples use functions referenced from the National
Instruments NI-488.2M GPIB reference. In each case, one source code example is in C++, the
other using QuickBasic.
IEEE-488 Programming in C++
int gpib_card=0;
int dm_port=1;
int sc_5500_address=10;
int port_1_status=0;
int port_2_status=0;
int port_3_status=0;
int port_4_status=0;
void zero_on (void)
{
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,"Z0X",3,0);
}
void zero_off (void)
{
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,"Z1X",3,0);
}
void norm_on (void)
{
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,"N0X",3,0);
}
void norm_off (void)
{
SendIFC(gpib_card);
Send(gpib_card,sc_5500_address,"N1X",3,0);
}
void auto_on (void)
{
SendIFC(gpib_card);
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com