Omega Speaker Systems VR200 instruction manual Print a

Page 40

7.5Program to Output Measured Data (in Bainary Code) from VR200 and Write to Disk

7.5Program to Output Measured Data (in Binary Code) from VR200 and Write to Disk

100

‘************************************************************

110

‘**

RS422A Example Program for IBM PC

**

120

‘**

 

**

130

‘**

To input and save measured data

**

140

‘**

(ASCII code)

**

150

‘**

 

**

160‘************************************************************

170‘**

180

‘**

Baud rate: 1200

Stop bit: 1 bit

190

‘**

Parity: none

Control: OFF/OFF

200

‘**

Data length: 8 bits

Others: LF is sent automatically.

210‘**

220

230OPEN “COM1:1200,N,8,1,LF” AS #1

240OPEN “TEST.DAT” FOR OUTPUT AS #2

250

260PRINT #1,CHR$(27)+”O 01"

270PRINT #1,”TS0"

280PRINT #1,”BO1"

290

300PRINT #1,CHR$(27)+”T”;

310PRINT #1,”FM1,01,04"

320D$=INPUT$(2,#1)

330PRINT #2,D$

340A=CVI(MID$(D$,1,2))

350PRINT A

360D$=INPUT$(A,#1)

370PRINT #2,D$

380PRINT ASC(MID$(D$,1,1));:PRINT “/”;

390PRINT ASC(MID$(D$,2,1));:PRINT “/”;

400PRINT ASC(MID$(D$,3,1));:PRINT

410PRINT ASC(MID$(D$,4,1));:PRINT “:”;

420PRINT ASC(MID$(D$,5,1));:PRINT “:”;

430PRINT ASC(MID$(D$,6,1))

440

450L=0

460FOR I=7 TO A

470PRINT RIGHT$(“0”+HEX$(ASC(MID$(D$,I,1))),2)+” “;

480L=L+1

490IF L=5 THEN L=0 : PRINT

500NEXT I

510

520PRINT #1,CHR$(27)+”C 01"

530CLOSE

540END

7 PROGRAM EXAMPLES

7 - 5

Image 40
Contents User’sGuide Servicing North America Preface TrademarksContents Transmitting Functions Time Chart Initial Status Errors During RS-422-A OutputProgram Examples Installing the RS-422-A Interface Interface SpecificationsInterface Terminal Terminal Assignment Cable TerminationCommunication Wiring Data ConfigurationStart-stop Asynchronous Communication TextInput Buffer Buffer OverflowSetting up the RS-422-A Communication Interface Setup ProcedureParameters IdentifierTerminator List of Program Set Commands Setting the Range and ScaleFormat SRp1,mode Example SR01,SKIPExample SR01, DI, Format SRp1, mode, p2Format SRp1, mode, p2, p3, p4, p5, p6, p7, p8 Setting Alarms Setting the Unit Setting the Waveform Span Rate TIME/DIVSetting the Clock Copying the Channel SettingsSetting the Partial Expanded Display Setting the Discrete Zone DisplaySetting the Tag Setting the Trip Level Setting the Data File Name FileSetting the LCD Brightness and LCD Saver LCD Setting the Summer/ Winter Time DSTFormat MDp1, p2, p3 Example MD02, ON, onList of Program Control Commands Alarm AcknowledgeStandard Screen Call Initializing the Data MemoryLoading the SET Configuration File Saving the SET Configuration FileSelecting the Output Data Selecting the Output Format for Measured DataMessage Writingfor the VR 200 with style number 2 or higher Status Output Execution of TriggerRequests for the data to be prepared in the buffer Open Command Close CommandESC O Crlf ESC C CrlfIntroduction to Output Data Formats Sequence see also Sections 2.3.7Output Format of Measured Values in Ascii Mode Output Data FormatsOutput Format of Measured Values in Binary Mode Output Format of Parameter Settings Output Format of Unit and Decimal Point Information Time Chart Initial Status Preventing Errors OutputHow to Request Error Message Output ESC S CR LFTiming of Resetting the Error Status Program Examples EnvironmentOpen TEST.DAT for Input AS #2 Others LF is sent automatically 210 ‘ 220 ‘ Open COM11200,N,8,1,LF AS #1 Print a Appendix Appendix 1 Ascii Code TableAppendix 2 File Naming Rules File Name LengthLowercase/Uppercase Letters System-reserved File NamesIndex Index for Command Reference Warrant Y/ Disclaimer Temperature