![Symmetricom 5071A Скачать руководство пользователя страница 90](http://html.mh-extra.com/html/symmetricom/5071a/5071a_operating-and-programming-manual_1419614090.webp)
Chapter 4 Remote Operation and Programming
Batch Processing for the Program Commands
62
Operating and Programming Manual
Example Program
The following HTBasic for Windows program demonstrates some of the points
discussed. The program consists of a Main program and two Defined Functions.
The FNConfig_ser_port$ is used to configure serial interface. The buffering
required for full-duplex operation is provided by the Microsoft Windows
operating environment.
The commands and queries to be executed are passed to the defined function
FNTalker$ as the string Output$. The function outputs the properly terminated
string and returns the instruments reply. The operation of the program can be
understood from the comments that are included.
HTBasic for Windows is available from TransEra Corporation.
1 ! 5071A Manual Example Rev: 9/13/06
2 !
3 !=======================================================================
4 !
5 CLEAR SCREEN
6 !
7 INTEGER Baud
8 DIM Return$[80]
9 !
10 COM /Io/Prompt$[4],Term$[1],@Ser_in,@Ser_out,Timeout,INTEGER Com_port
11 !
12 Prompt$="scpi"
13 Term$=">"
14 Timeout=2
15 !
16 !-----------------------------------------------------------------------
17 ! Set up serial port.
18 Com_port=9 ! Serial A/Com 1.
19 Baud=9600
20 !
21 Return$=FNConfig_ser_port$(Com_port,Baud)
22 PRINT Return$
23 !
24 ASSIGN @Ser_in TO Com_port;FORMAT ON
25 ASSIGN @Ser_out TO Com_port;FORMAT ON
26 !
27 !-----------------------------------------------------------------------
28 ! Command and Query 5071A.
29 !
30 Return$=FNTalker$("*CLS") ! Clear status registers and
31 PRINT Return$ ! error queue.
32 Return$=FNTalker$("SYST:REM ON") ! Enable remote operation.
33 PRINT Return$
34 Return$=FNTalker$("DISP:ENAB ON") ! Set clock display on.
35 PRINT Return$
36 Return$=FNTalker$("PTIM:TIME 13,09,24") ! Set 24-hour time.
37 PRINT Return$
38 Return$=FNTalker$("SYST:REM OFF") ! Disable remote operation.
39 PRINT Return$
40 !
41 Return$=FNTalker$("DIAG:VOLT:EMUL?") ! Query electron multiplier
42 PRINT Return$ ! voltage.
43 Return$=FNTalker$("ROSC:CONT?") ! Query reference oscillator
Содержание 5071A
Страница 2: ......
Страница 28: ...Preface xxvi Operating and Programming Manual ...
Страница 29: ...____________________________________________ Chapter 1 Getting Started Getting Started ...
Страница 32: ...Chapter 1 Getting Started The 5071A at a Glance 4 Operating and Programming Manual ...
Страница 33: ...Chapter 1 Getting Started The 5071A at a Glance Operating and Programming Manual 5 ...
Страница 34: ...Chapter 1 Getting Started The 5071A at a Glance 6 Operating and Programming Manual 48V OPTION REAR PANEL VIEW ...
Страница 40: ...Chapter 1 Getting Started Performing Basic Tasks 12 Operating and Programming Manual ...
Страница 41: ...____________________________________________ Chapter 2 Using the 5071A Using the 5071A ...
Страница 57: ...____________________________________________ Chapter 3 In Case of Difficulty In Case of Difficulty ...
Страница 97: ...____________________________________________ Chapter 5 Command Reference Command Reference ...
Страница 119: ...Chapter 5 Command Reference Description of SCPI Commands Operating and Programming Manual 91 ...
Страница 136: ...Chapter 5 Command Reference Error Messages Codes 108 Operating and Programming Manual ...
Страница 137: ...____________________________________________ Chapter 6 Specifications Specifications ...
Страница 145: ...____________________________________________ Chapter 7 Installation Installation ...
Страница 162: ...Chapter 7 Installation Cesium Beam Tube Replacement 134 Operating and Programming Manual ...
Страница 163: ...____________________________________________ Appendix A Performance Tests Performance Tests Verifying Specifications ...
Страница 186: ...Appendix A Performance Tests 5071A PERFORMANCE TEST 158 Operating and Programming Manual ...
Страница 187: ...____________________________________________ Appendix B Glossary Glossary ...
Страница 190: ...Appendix B Glossary 5071A Glossary 162 Operating and Programming Manual ...