Source file: "C:\\Documents and Settings\\daa00\\My Documents\\VEE Programs\\caspre\\pulsewidth.vee"
File last revised: Mon Jan 20 10:40:42 2003
Date documented:  Mon Jan 20 10:41:01 2003
VEE revision: 6.0
Execution Mode: VEE 6
Convert Infinity on Binary Read: no

I/O Configuration
  Embedded Configuration (pulsewidth.vee)
    GPIB7
      FuncGen(ag33250a@710)
        Plug&play Driver: AG33250A
        VISA address: GPIB0::10::INSTR
          Timeout (sec): 5.000000
          Byte ordering: MSB


--------------------------------------------------
M: Main
 Device Type              : Main
 Context is secured       : off
 Trig mode                : Degrees
 Popup Panel Title Text   : Untitled
 Show Popup Panel Title   : on
 Show Popup Panel Border  : on
 Popup Moveable           : on
 Popup Panel Title Text Color         : Object Title Text
 Popup Panel Title Background Color   : Object Title
 Popup Panel Title Text Font          : Object Title Text
 Delete Globals at Prerun : on

M.0: Main/Enable Output
 Device Type              : VXIplug&play
 Transactions             : ag33250a_outpSetup(instrHandle, ag33250a_OUTPUT_SETUP_ON)

M.1: Main/output termination 50 ohms
 Device Type              : VXIplug&play
 Transactions             : ag33250a_outpLoad(instrHandle, ag33250a_OUTPUT_LOAD_50)

M.5: Main/Agilent Copyright
 Device Type              : Note Pad
 Note Contents            :
   1. \' """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   2. \'    Copyright  2003 Agilent Technologies Inc. All rights
   3. \'    reserved.
   4. \'
   5. \' You have a royalty-free right to use, modify, reproduce and distribute
   6. \' the Sample Application Files (and/or any modified version) in any way
   7. \' you find useful, provided that you agree that Agilent has no
   8. \' warranty,  obligations or liability for any Sample Application Files.
   9. \'
   10. \' Agilent Technologies provides programming examples for illustration only,
   11. \' This sample program assumes that you are familiar with the programming
   12. \' language being demonstrated and the tools used to create and debug
   13. \' procedures. Agilent support engineers can help explain the
   14. \' functionality of Agilent software components and associated
   15. \' commands, but they will not modify these samples to provide added
   16. \' functionality or construct procedures to meet your specific needs.
   17. \' """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
   18. 

M.6: Main/Program Information
 Device Type              : Note Pad
 Note Contents            :
   1. The program requires the Agilent 33250A/33220A plug and 
   2. play driver. This driver can be found at 
   3. www.agilent.com/find/drivers
   4. 
   5. This program uses low-leve SCPI commands to configure the 
   6. function generator to output an PWM waveform.  The pulse is set
   7. up with a duty cycle of 35% and a depth of 15%, and will vary
   8. in width from 20% to 50% with the modulation.  The puse may 
   9. also be configured in time units (pulse width and deviation)
   10. rather than duty cycle if preferred.
   11. 
   12. This program was written using:
   13. VEE Pro 6
   14. Agilent GPIB
   15. Instrument at address 10
   16. Win 2000
   17. 33250/33220A VXIpnp Driver
   18. 

M.7: Main/Warranty Disclaimer
 Device Type              : Note Pad
 Note Contents            :
   1. This example is provided as an illustration
   2. "as is", and Agilent Technologies makes
   3. no warranty of any kind with regard to this
   4. example.

M.8: Main/Error Message
 Device Type              : AlphaNumeric
  Input pin  1            : Data (Any, Any)
 Clear At Prerun          : on
 Clear at Activate        : on
 Indices Enabled          : on

M.9: Main/Error Number
 Device Type              : AlphaNumeric
  Input pin  1            : Data (Any, Any)
 Clear At Prerun          : on
 Clear at Activate        : on
 Indices Enabled          : on

M.10: Main/Reset Instrument
 Device Type              : VXIplug&play
 Transactions             : ag33250a_reset(instrHandle)

M.11: Main/Check Errors
 Device Type              : VXIplug&play
  Output pin 1            : errorNum
  Output pin 2            : error_message
 Transactions             : ag33250a_error_query(instrHandle, errorNum, error_message)

M.12: Main/Carrier waveshape is pulse @ 5kHz
 Device Type              : VXIplug&play
 Transactions             :
   1. ag33250a_funcShap(instrHandle, ag33250a_OUTPUT_FUNC_PULS)
   2. ag33250a_freq(instrHandle, 5000)

M.13: Main/Set parameters to 5 V TTL
 Device Type              : VXIplug&play
 Transactions             :
   1. ag33250a_voltHigh(instrHandle, 5)
   2. ag33250a_voltLow(instrHandle, 0)

M.14: Main/Configure  PWM using Direct IO
 Device Type              : Direct I/O
 Description              :
   1. Begin with 35% duty cycle
   2. Modulating waveshape is triangle
   3. Modulating frequency is 2 Hz
   4. Modulation depth is 15%
   5. Use internal signal for modulation
   6. note: if using external signal for PWM, connect the signal to the rear
   7. panel and use the commande "PWM:SOUR EXT
 Transactions             :
   1. WRITE TEXT "FUNC:PULS:DCYC 35" EOL
   2. WRITE TEXT "PWM:INT:FUNC TRI" EOL
   3. WRITE TEXT "PWM:INT:FREQ 2" EOL
   4. WRITE TEXT "PWM:DEV:DCYC 15" EOL
   5. WRITE TEXT "PWM:SOUR INT" EOL
   6. WRITE TEXT "PWM:STAT ON" EOL
