1. LCWFG500.LLB CORE LIBRARY CONTENTS

1.1. LCWFG500 VI Tree.vi

The library of core driver Virtual Instruments with examples. The VI Tree displays all the user-callable VIs of the instrument driver in an organized table.

1.2. LCWFG500 Application.vi

Application example VI that shows how to use the driver VIs in this library. In particular it shows how to request the status and check which channels are available and functioning correctly on your WFG500 generator. It creates suitable arrays for producing a continuous signal such as in a frequency generator, in addition it creates the array for setting the trigger at the first point of the signal. The data will be loaded into the channels that are present. Then it configures the clock to 10 MHz with continuous operation and internal triggering.

1.3. LCWFG500 Close.vi

This VI closes the serial port VISA session that was opened using the initialize VI. It should always be called when you want to disconnect from the generator. This frees the serial port for other applications.

1.4. LCWFG500 Configure Clock.vi

With this VI you can set up the clock. All commands for controlling the clock are grouped into this vi to obtain a familiar functionality. The clock is configured using three choices and an optional control for setting the software clock period. The possible clock types are [10 MHz, 1 MHz, software clock, external clock]. Possible modes are [continuous, burst, burst and invert]. Possible triggering sources are [internally, externally]. In addition if the software clock was chosen, also its period will be set, otherwise this control will be ignored. Valid values for the software clock period are [1…35] ms with 1 ms resolution. It also sets the general time out of the VISA session depending on the clock type. For the 10 MHz clock the maximum time that can be generated is about 40261 ms for the 1 MHz clock this is about 402608 ms. For the software clock this ranges from 1 to 35 times 402608129 ms. These values are set as general time out when configuring the clock. For the external clock a value of 402608129 ms is set, corresponding to a 1 kHz or higher clock, if a clock lower than 1 kHz is used you should set the time out manually after calling this VI with an attribute node.

1.5. LCWFG500 Delete Range.vi

Using this VI you can delete a range of pulses from the waveforms stored in the generator channels. All channels and the timing are affected. In order to specify the range you chose the start address [1…12287] and the number of pulses (Pulse count) [1…12287] in the range. The start address is given as a pulse number where 1 represents the first pulse. The range includes the pulse at the start address.

1.6. LCWFG500 Error Message.vi

This VI will report if an error is set in the error cluster. It contain all possible error byte codes that generate a warning, the error code for the error “Ready query failed” and the warning code for “Generator not ready to accept run”. In all cases of a warning, the communication with the generator has not been endangered. Only errors coming from VISA operations and the “Ready query failed” error will disable communication with the generator. Use this VI especially during debugging of your VIs.

1.7. LCWFG500 Error Query.vi

This is a mandatory utility VI for instrument drivers. However the WFG500 generator does not support an error query as such, instead it returns an error byte after most commands. All VI’s that have to deal with this error byte will do so and place a warning in the error out cluster if necessary. You can read the warnings directly in the source string from the error cluster or you can call the Error Message VI to display them in a window. Calling this VI will place the
“Error query not supported” warning in the error cluster. This VI is only added to comply to National Instruments’ strict standards for inclusion of this driver into the IDL (Instrument Driver Library).

1.8. LCWFG500 Frequency Generator.vi

This is a soft panel example which simulates an interactive frequency generator using the WFG500. Connect the generator to a serial port and select that port’s number in the front panel, then start the program. Click UPDATE to send the desired waveform to the generator. When this is done the generator should be ready to run, click RUN. Connect an oscilloscope to one of the channels and connect the external trigger input of the oscilloscope to the trigger output of the generator, select external triggering on the oscilloscope. If you now change the phase of the waveform in the cluster and click UPDATE you will see the waveform roll left or right. This is because the application VI also sets a trigger point at the first point of the waveform. Click STOP to stop signal generation on the generator. Click END PROGRAM to end this example VI.

1.9. LCWFG500 Getting Started.vi

This VI shows how to use the Application VI and other driver VI’s in this library. When running, it first initializes the serial port, configures the clock, calls the Application VI which will send a waveform to the generator (see LCWFG500 Application.vi for more information) and sends the run command. It finishes by calling the Error Query VI, the Error Message VI and then closes the VISA session on the serial port.

1.10. LCWFG500 Initialize.vi

This VI will initialize the serial port you have specified in the instrument descriptor, you can reset the generator by wiring true to the reset input. An identification query is not supported by the WFG500 and setting this input to true will set the “ID Query not supported” warning in the error cluster. This VI sets all necessary serial parameters.

1.11. LCWFG500 Insert Range.vi

Using this VI you can insert a range of pulses into the waveforms stored in the generator channels. All channels and the timing are affected. You chose the before address [1…12287] and the number of pulses (Pulse count) [1…12287] in the range. The address is given as a pulse number where 1 represents the first pulse. The pulses are inserted before the specified address.

1.12. LCWFG500 Invert Amplitudes In Range.vi

With this VI you can invert the amplitudes of a range of pulses stored in the generator. In order to specify the range you chose the start address and the number of pulses (Pulse count) [1…12287] in the range. The start address [1…12287] is given as a pulse number where 1 represents the first pulse. The range includes the pulse at the start address. In addition to the range you have to specify the channel byte, this is a number which represents the binary translation of the eight possible channels, a `true’ will address that channel, e.g 1 (00000001) selects channel 1 only, 9 (00001001) selects channel 4 and 1 etc. If you set the Pulse count to -1, all pulses in the waveform will be inverted.

1.13. LCWFG500 Reset.vi

This utility VI will execute a remote reset of the generator. The default setup is sent after resetting.

1.14. LCWFG500 Revision Query.vi

This VI queries the current instrument firmware revision and instrument driver revision.

This Instrument Driver’s Revision number is “Rev 1.0, May 2001, LV 6.0.2″ and is compatible with Instrument Firmware Revision 128. (WFG500 high voltage waveform generator) Created By: FLC Electronics Release Date: May 2001 Originally Developed in LabVIEW Version: 6.0.2 Originally Developed in Firmware Revision: 128

1.15. LCWFG500 Roll Waveform.vi

With this VI you can roll waveforms stored in the generator over a specified amount of steps (pulses). You specify the Direction [F: left (default), T: right], and the amount of steps in Step count [1…12287]. You also need to specify the channel byte, this is a number which represents the binary translation of the eight possible channels, a `true’ will address that channel, e.g 2 (00000010) selects channel 2 only, 131 (10000011) selects channel 8, 2 and 1 etc. Only the selected channels will be affected.

1.16. LCWFG500 Run.vi

This VI will issue a run command to the generator if it is ready to run and not already running. If the “Generator was not ready to accept run” (e.g. not enough or no data stored) then this warning will appear in the error cluster. The actual state of the generator is returned through the output “running”.

1.17. LCWFG500 Self Test.vi

This is a mandatory utility VI for instrument drivers. However the WFG500 generator does not support a self test command. The WFG500 always performs a self test at startup. Calling this VI will place the “Self test not supported” warning in the error cluster. This VI is only added to comply to National Instruments’ strict standards for inclusion of this driver into the IDL (Instrument Driver Library).

1.18. LCWFG500 Send Data.vi

This is a VI which takes care for sending entire waveforms, timing, c-bit information and trigger information to the generator. Timing is passed to this VI as a 1D array where each element represents a pulse and its value [2…32767] is the length of that pulse in basic clock units, e.g. 1 μs for 1 MHz clock or 0.05 μs for 20 MHz clock. Together with the array containing the trigger information the correct string is distilled and sent to the generator, the same goes for the 2D array Waveforms together with the 2D C-bits array and the 1D Channels array. If the Trigger array contains less elements than the Timing array it will be filled up with extra `false’ (no trigger) elements, when it contains more elements it will be truncated to the length [1…12287] of Timing. The same applies to the C-bits array with the Waveforms array whose data values represent voltages [-100…100] with 0.05 V resolution. The Channels array should have the same size as the size along the first index of the Waveforms array, i.e. number of waveforms. If it contains more elements it will be truncated, if it contains less elements it becomes dominant and only those waveforms with a corresponding element in the channels array will be sent. Valid values for elements of the Channels array are numbers that represents the binary translation of the eight possible channels, a `true’ will address that channel, e.g 16 (00010000) selects channel 5 only, 7 (00000111) selects channel 1, 2 and 3 together, etc. Only the selected channels will be affected. The correct interpretation of the indices of both Waveforms and C-bits arrays are: first index equals number of waveforms [1…8], second index equals number of pulses [1…12287]. You should take care that the number of pulses is equal to the size of the Timing array otherwise incorrect rendering of the waveforms on the generator may occur. If you leave the Trigger array unwired or empty no trigger point will be set, if you leave C-bits unwired or empty no c-bit will be set. If you leave Timing unwired or empty no timing data including triggers will be sent. If you leave Waveforms unwired or empty than no waveform data including c-bits will be sent. On the other hand if you leave Channels unwired the VI will send waveforms to individual channels starting from 1 up to eight provided that Waveforms is not empty. You should reconfigure the clock after calling this VI if the generator was running. When the generator is running, the amount of data that can be sent is reduced. The actual amount that can be sent is about 7000 individual pulses if only one waveform and timing is sent. If you need to sent more data you should first stop the generator and set it to run after loading all the data.

1.19. LCWFG500 Send Multiple Times.vi

This VI allows you to change time values and triggers of the timing data which is already stored in the generator. You specify arrays containing addresses, time values in basic clock units [2…32767] and trigger data. The address is given as a pulse number, 1 being the first pulse [1…12287]. You should take care that all arrays have the same size, however in the case that the trigger array contains less elements it will be filled up with extra `false’ (no trigger) elements. If Addresses or Times contains less elements it will become dominant, and only those pulses with complete data will be sent starting from the first elements in the arrays.

1.20. LCWFG500 Send Multiple Voltages.vi

This VI allows you to change Voltage values and triggers of the timing data which is already stored in the generator. You specify arrays containing addresses, voltages [-100…100], c-bit data and channel data. The address is given as a pulse number, 1 being the first pulse [1…12287]. You should take care that all arrays have the same size, however in the case that the C-bits array contains less elements it will be filled up with extra false’ (no trigger) elements. If Addresses, Voltages or Channels contains less elements it will become dominant, and only those pulses with complete data will be sent starting from the first elements in the arrays. A valid element of the Channels array is a number that represents the binary translation of the eight possible channels, atrue’ will address that channel, e.g 4 (00000100) selects channel 3 only, 192 (11000000) selects channel 8 and 7 etc. Only the selected channels will be affected.

1.21. LCWFG500 Send One Time.vi

With this VI you can change the timing of one pulse. You specify an address given as a pulse number, 1 being the first pulse [1…12287], the Time value [2…32767] is given in basic clock units. The Trigger can be set by setting this input to `true’.

1.22. LCWFG500 Send One Voltage.vi

With this VI you can change the Voltage of one pulse. You specify an address given as a pulse number, 1 being the first pulse [1…12287], the Voltage value [-100…100] has a resolution of 0.05 V. The C-bit can be set by setting this input true’. In addition you specify the Channel, a valid value is a number that represents the binary translation of the eight possible channels, atrue’ will address that channel, e.g 8 (00001000) selects channel 4 only, 96 (01100000) selects channel 7 and 6 etc. Only the selected channels will be affected.

1.23. LCWFG500 Set Range To Zero.vi

With this VI you can set the amplitudes of a range of pulses stored in the generator to zero voltage. In order to specify the range you chose the start address and the number of pulses (Pulse count) [1…12287] in the range. The start address [1…12287] is given as a pulse number where 1 represents the first pulse. The range includes the pulse at the start address. In addition to the range you have to specify the channel byte, this is a number which represents the binary translation of the eight possible channels, a `true’ will address that channel, e.g 32 (00100000) selects channel 6 only, 18 (00010010) selects channel 5 and 2 etc.

1.24. LCWFG500 Status Request.vi

This VI reads the current status of the generator and returns it in a cluster. You can select each property by unbundling the status cluster by name and selecting what you desire. A description of the status bytes can be found in the WFG500 manual. Some bytes have been translated to useful values and are accessed as such.

1.25. LCWFG500 Stop.vi

This VI will issue a stop command to the generator if it is running. The actual state of the generator is returned through the output “running” (false in this case means it is stopped or running out the waveform for the last time).

2. LCWFG500U.LLB UTILITY LIBRARY CONTENTS

2.1. LCWFG500 Utility Error Byte Test.vi

This Utility VI interprets the error byte returned by most commands and takes appropriate action to set a warning in the error cluster if necessary.

This VI is called only from VIs in the LCWFG500 driver library, and is not meant to be altered. Changing this VI can cause those VIs to operate improperly.

2.2. LCWFG500 Utility Clean Up Initialize.vi

This Utility VI closes any open VISA sessions in the event that there is an error during an initialization.

This VI is called only from VIs in the LCWFG500 driver library, and is not meant to be altered. Changing this VI can cause those VIs to operate improperly.

2.3. LCWFG500 Utility Default Instrument Setup.vi

This Utility VI sends the default command string to the generator whenever a new VISA session is opened, or the generator is reset.

This VI is called only from VIs in the LCWFG500 driver library, and is not meant to be altered. Changing this VI can cause those VIs to operate improperly.

2.4. LCWFG500 Utility Ready Query.vi

This VI performs a ready query on the generator to see if it is ready t accept data. This is necessary if long waveforms are used as the generator can be busy for a long time. If the generator returns that the status command was expected this is send and the “Status command was expected” warning is set in the error cluster and the query is renewed. If the generator does not respond within the time out the “Ready query failed” error is set in the error cluster and all further communication is suspended. The time out is dependent on the clock type and is therefore set by the configure clock VI.

This VI is called only from VIs in the LCWFG500 driver library, and is not meant to be altered. Changing this VI can cause those VIs to operate improperly.