![Labsphere SC-5500 Скачать руководство пользователя страница 38](http://html1.mh-extra.com/html/labsphere/sc-5500/sc-5500_manual_3204784038.webp)
SX-01635-000, Rev. 5
35
{
case 1:port_1_status=position;break;
case 2:port_2_status=position;break;
case 3:port_3_status=position;break;
case 4:port_4_status=position;break;
default:break;
}
}
void lamp_on(void)
{
port_3_status=port_3_status|0x01;//set bit 1 high, and leave the rest alone
set_port(3,port_3_status);
}
void lamp_off(void)
{
port_3_status=port_3_status&0xfe;//set bit 1 low, and leave the rest alone
set_port(3,port_3_status);
}
IEEE-488 Programming in QuickBasic
This programming example uses the IBIC command structure. When addressing the SC-5500
through the IEEE interface, common bus initializations, device clears and device finds are
required. Then, using the IBIC
command structure, My Talk Address and My Listen Address
must be set for the communications board and the SC-5500. Then, when addressing the SC-5500
to perform an instruction, an IBCMD (Interface Bus Command) statement can be sent out to set
up the nature of the communication occurring (i.e. SC-5500 as a TALKER and the interface
board as a LISTENER). Once the communication parameter has been established, string com-
mands can be sent to instruct the SC-5500 to perform the required actions.
If, during the process of sending commands to the SC-5500, a string or character is sent that the
SC-5500 does not recognize, an
INVALID COMMAND ERROR
status message will be dis-
played on the front panel of the SC-5500. The duration of the display will be as long as required
to clear the buffer of the characters. If there is a sufficient amount of unrecognizable characters
in the buffer, it may become necessary to power off the SC-5500 and then power it back on.
‘initialization
REM $INCLUDE: 'c:\at-gpib\qbasic\qbdecl.bas'
‘INCLUDE file that points the program to
‘the area where the IEEE-488 Quick Library
‘of commands
scread$ = "?_J "
‘Sets MyTalk address (MTA) to 10 and
‘MyListen address (MLA) to 0
scwrite$ = "?_*@"
‘Sets (MTA) to 0 and
‘(MLA) to 10
CALL IBFIND("DEVA", 10)
‘Find SC-5500 at address 10
CALL SendIFC(0)
‘Send InterFace Clear
CALL DevClear(0, 10)
‘Clear SC-5500 bus
CALL IBCMD(0, scwrite$)
‘Send MTA/MLA
CALL IBWRT(0, "P1C1K1H1L0X")
‘Set SC-5500 for 4 1/2 Digits, to Cal 0 and
‘Remote ON operation
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com