<PRE?>
The instrument sends the preset value of the active reference
<PRE +123.45>
Enter preset. Numeric values must always be preceded by a sign.
<PRE +0>
Refer to the user's manual of the specific instrument for special applications.
Program samples
Standard Basic
Simplex cable
Serial port opening and parameters
Power supply setting
(RTS=ON, DTR = ON)
&H3FC register addresse (COM2: &H2FC)
Set DTR line OFF
(RTS=ON, DTR = OFF)
Data reading
Duplex cable
Serial port opening and parameters
Power supply setting
(RTS=OFF, DTR = ON)
&H3FC register addresse (COM2: &H2FC)
Data request (<CR> will be automatic using this
command)
Data reading
Visual Basic
The communication control (MsComm) of VisualBasic must be applied :
Port opening
ower supply setting
P
Data request
Data reading
For more information, refer to the help menu of MSComm in Visual Basic. Program available on www.sylvac.ch
web site.
' Use COM1.
Comm1.CommPort = 1
' 4800 baud, even parity, 7 data, and 2 stop bit.
Comm1.Settings = "4800,E,7,2"
' Open the port.
Comm1.PortOpen = True
' Simplex Cable'
Form1.MSComm1.DTREnable = True
Form1.MSComm1.RTSEnable = True
' Duplex Cable'
Form1.MSComm1.DTREnable = True
Form1.MSComm1.RTSEnable = False
' Simplex Cable'
MSComm1.DTREnable = False
Timer1.Interval = 150
Timer1.Enabled = True
'Duplex cable + duplex instrument'
MSComm1.Output = "?" + Chr$(13)
'Duplex cable + simplex instrument'
MSComm1.Break = True
'Incremente Timer1.Interval in case of no transmission'
Timer1.Interval = 10
Timer1.Enabled = True
MSComm1.Break = False
InString$ = Comm1.Input
OPEN "COM1:4800,E, 7, 2, PE"
OUT &H3FC,&H0B
OUT &H3FC,&H0A
Line input #1,a$
OPEN "COM1:4800, E, 7, 2, PE"
OUT &H3FC,&H09
PRINT #1, "?"
LINE INPUT #1,a$
14