Changes

Jump to navigation Jump to search
Line 2: Line 2:       −
Frame 1:
+
'''Frame 1:'''
Variables Used-
+
 
 +
''Variables Used-''
 +
 
 
• DeviceIndex
 
• DeviceIndex
 
• Trigger_Slope
 
• Trigger_Slope
Line 9: Line 11:  
• Control_Data1
 
• Control_Data1
 
• PulseTrigger
 
• PulseTrigger
Functions-
+
 
 +
''Functions-''
 +
 
 
• Unbundle – takes the values in a cluster and returns separate elements within the cluster as 1-dimensional values
 
• Unbundle – takes the values in a cluster and returns separate elements within the cluster as 1-dimensional values
 
• Bundle - takes multiple 1-dimensional values and combines them into a cluster
 
• Bundle - takes multiple 1-dimensional values and combines them into a cluster
 
• Library Function* “sdSetTriggerAndSampleRate” – sets up a trigger to initialize other functions in the program as well as the time interval of data acquisition.
 
• Library Function* “sdSetTriggerAndSampleRate” – sets up a trigger to initialize other functions in the program as well as the time interval of data acquisition.
 +
 
*(Note: The library functions are .DLL files and it requires decoders, usually in C++. Therefore, it is not quite possible to see exactly what the function is doing, but if the parameters fit the success criteria the output is either a 1 for success or 0 for failure. The inputs of the library functions are also preserved.)
 
*(Note: The library functions are .DLL files and it requires decoders, usually in C++. Therefore, it is not quite possible to see exactly what the function is doing, but if the parameters fit the success criteria the output is either a 1 for success or 0 for failure. The inputs of the library functions are also preserved.)
Frame 2:
+
 
Variables-
+
'''Frame 2:'''
 +
 
 +
''Variables Used-''
 +
 
 
• FiltAndTrigger
 
• FiltAndTrigger
 
• DeviceIndex
 
• DeviceIndex
 
• Control_Data1
 
• Control_Data1
Functions-
+
 
 +
''Functions-''
 +
 
 
• Unbundle
 
• Unbundle
 
• Library Function “sdSetFilt” – sets channel and filter trigger
 
• Library Function “sdSetFilt” – sets channel and filter trigger
Frame 3:
+
 
Variables Used-
+
'''Frame 3:'''
 +
 
 +
''Variables Used-''
 +
 
 
• Device Index
 
• Device Index
 
• Level
 
• Level
Line 31: Line 44:  
• Ch2_ACDC
 
• Ch2_ACDC
 
• Control_Data1
 
• Control_Data1
Functions-
+
 
 +
''Functions-''
 +
 
 
• Library Function “sdGetLevel” – reads waveform position adjust data from the oscilloscope
 
• Library Function “sdGetLevel” – reads waveform position adjust data from the oscilloscope
 
• Library Function “sdSetVoltageAndCoupling” – sets voltage and coupling of both channels of the oscilloscope
 
• Library Function “sdSetVoltageAndCoupling” – sets voltage and coupling of both channels of the oscilloscope
Frame 4:
+
 
Variables Used-
+
'''Frame 4:'''
 +
 
 +
''Variables Used-''
 +
 
 
• DeviceIndex
 
• DeviceIndex
 
• Level
 
• Level
Functions-
+
 
 +
''Functions-''
 +
 
 
• Library Function “sdGetLevel”
 
• Library Function “sdGetLevel”
Frame 5:
+
 
Variables Used-
+
'''Frame 5:'''
 +
 
 +
''Variables Used-''
 +
 
 
• Levers
 
• Levers
 
• DeviceIndex
 
• DeviceIndex
Line 48: Line 71:  
• PulseTrigger (unbundled)
 
• PulseTrigger (unbundled)
 
• Level
 
• Level
Functions-
+
 
 +
''Functions-''
 +
 
 
• Library Function “sdSetOffset” – adjusts the position of the channel
 
• Library Function “sdSetOffset” – adjusts the position of the channel
Frame 6:
+
 
Variables Used-
+
'''Frame 6:'''
 +
 
 +
''Variables Used-''
 +
 
 
• DeviceIndex
 
• DeviceIndex
Functions-
+
 
 +
''Functions-''
 +
 
 
• Library Function “sdCaptureStart” – starts to capture data from the oscilloscope
 
• Library Function “sdCaptureStart” – starts to capture data from the oscilloscope
Frame 7:
+
 
Variables Used-
+
'''Frame 7:'''
 +
 
 +
''Variables Used-''
 +
 
 
• DeviceIndex
 
• DeviceIndex
Functions-
+
 
 +
''Functions-''
 +
 
 
• Library Function “sdTriggerEnabled” – sets the trigger
 
• Library Function “sdTriggerEnabled” – sets the trigger
Frame 8:
+
 
Variables Used-
+
'''Frame 8:'''
 +
 
 +
''Variables Used-''
 +
 
 
• CH1_Voltage
 
• CH1_Voltage
 
• CH2_Voltage
 
• CH2_Voltage
Line 85: Line 123:  
• Y Maximum
 
• Y Maximum
 
• Length
 
• Length
Functions-
+
 
 +
''Functions-''
 +
 
 
• Bundle
 
• Bundle
 
• Unbundle
 
• Unbundle
Line 97: Line 137:  
• Library Function “sdSetOffset”
 
• Library Function “sdSetOffset”
 
• Library Function “sdSetVoltageAndCoupling”
 
• Library Function “sdSetVoltageAndCoupling”
 +
 
Function of the Program:
 
Function of the Program:
 +
 
Frames 1-7 of the LabVIEW program for the oscilloscope are part a flat sequence structure. It was most likely set up like this for organization and to ensure all of the functions and subVIs fire in the correct order. The first 7 frames are for initializing the data acquisition and the 8th fame has the bulk of the program functionality.
 
Frames 1-7 of the LabVIEW program for the oscilloscope are part a flat sequence structure. It was most likely set up like this for organization and to ensure all of the functions and subVIs fire in the correct order. The first 7 frames are for initializing the data acquisition and the 8th fame has the bulk of the program functionality.
   −
Frame 8:
+
'''Frame 8:'''
 +
 
 
The majority of Frame 8 is immersed in a “while” loop, which continues unless stopped. The first half of the “while” loop is inside of a case structure which is enabled or disabled by the push of a Boolean push-button; by disabling this case-structure, it makes the program run faster because there is no need to process data that need not be inputted. A case structure is wired to the CH1_Voltage variable; the case structure has a numeric value inside which changes to whatever the CH1_Voltage is equal to. Another case structure is set up in the same manner but the variable is for channel 2 (CH2_Voltage). CH1_Voltage and CH2_Voltage are compared to CH1_Att and CH2_Att respectively; if the channels’ voltages are not equal to each other, a Boolean value of true is produced and sent to an “or” comparator. The “or” comparator sends a value of true or false to another case structure which when “true,” sets voltages and couplings via the function “sdSetVoltageAndCoupling,” otherwise when false, funnels the CH1_Voltage and CH2_Voltage straight through. Concurrently, Ch1Lever, Ch2Lever, Ch1TrigLever, and Ch2TrigLever are bundled with the “Lever” cluster to create a larger cluster. This cluster with the CH1_Voltage, CH2_Voltage, DeviceIndex, Trigger Source, and Level are put into the Library Function “sdSetOffset.” From this, Trig_Source and TIMEBASE are bundled with Control_Data1 into a cluster.  
 
The majority of Frame 8 is immersed in a “while” loop, which continues unless stopped. The first half of the “while” loop is inside of a case structure which is enabled or disabled by the push of a Boolean push-button; by disabling this case-structure, it makes the program run faster because there is no need to process data that need not be inputted. A case structure is wired to the CH1_Voltage variable; the case structure has a numeric value inside which changes to whatever the CH1_Voltage is equal to. Another case structure is set up in the same manner but the variable is for channel 2 (CH2_Voltage). CH1_Voltage and CH2_Voltage are compared to CH1_Att and CH2_Att respectively; if the channels’ voltages are not equal to each other, a Boolean value of true is produced and sent to an “or” comparator. The “or” comparator sends a value of true or false to another case structure which when “true,” sets voltages and couplings via the function “sdSetVoltageAndCoupling,” otherwise when false, funnels the CH1_Voltage and CH2_Voltage straight through. Concurrently, Ch1Lever, Ch2Lever, Ch1TrigLever, and Ch2TrigLever are bundled with the “Lever” cluster to create a larger cluster. This cluster with the CH1_Voltage, CH2_Voltage, DeviceIndex, Trigger Source, and Level are put into the Library Function “sdSetOffset.” From this, Trig_Source and TIMEBASE are bundled with Control_Data1 into a cluster.  
 
Most of the data is then wired into another flat sequence structure for two frames; Pulse_Trigger is unbundled into 1-dimensional arrays and wired to the function “sdSetTriggerAndSampleRate” along with DeviceIndex, TriggerSlope, ETS, and the bundled TIMEBASE and Trig_Source. The data is then moved to the second frame in this sequence where the DeviceIndex and FiltAndTrigger are put into the function “sdSetFilt.”
 
Most of the data is then wired into another flat sequence structure for two frames; Pulse_Trigger is unbundled into 1-dimensional arrays and wired to the function “sdSetTriggerAndSampleRate” along with DeviceIndex, TriggerSlope, ETS, and the bundled TIMEBASE and Trig_Source. The data is then moved to the second frame in this sequence where the DeviceIndex and FiltAndTrigger are put into the function “sdSetFilt.”
 
The last part of “initialization” is the funneling of all of the variables listed including data_tab_ch1 and data_tab_ch2, and a constant 0 into the “sdGetData” function, which sends the appropriate data to show on the waveform graph. This last half of the “while” loop has a sequence of case structures that may be disabled via use of push-buttons. If the return value of the “sdGetData” function has a successful value of 1 it then enables the next case-structure. The data from channel 1 of the oscilloscope then wired to two separate case-structures, one which is sent to a “write to file” function and the other to a graphing function. The case-structure which contains the “write to file” function can be enabled or disabled by a switch; the data is wired to an “array subset” function with the “length” as the length of the subset array and the “X Minimum” is the index. The last portion of the work of the program deals with the case-structure which contains the graphing function. The data from channels 1 and 2 are into a build array function and put into a “waveform graph” function, which can also be enabled or disabled via button. The data of the program is then put into a shift-register, which preserves the data and reuses it as starting values at the beginning of the register.
 
The last part of “initialization” is the funneling of all of the variables listed including data_tab_ch1 and data_tab_ch2, and a constant 0 into the “sdGetData” function, which sends the appropriate data to show on the waveform graph. This last half of the “while” loop has a sequence of case structures that may be disabled via use of push-buttons. If the return value of the “sdGetData” function has a successful value of 1 it then enables the next case-structure. The data from channel 1 of the oscilloscope then wired to two separate case-structures, one which is sent to a “write to file” function and the other to a graphing function. The case-structure which contains the “write to file” function can be enabled or disabled by a switch; the data is wired to an “array subset” function with the “length” as the length of the subset array and the “X Minimum” is the index. The last portion of the work of the program deals with the case-structure which contains the graphing function. The data from channels 1 and 2 are into a build array function and put into a “waveform graph” function, which can also be enabled or disabled via button. The data of the program is then put into a shift-register, which preserves the data and reuses it as starting values at the beginning of the register.
 
There are a couple other things in the program that are shown but do not quite pertain to the actual data acquisition. The scales of “X” and “Y” of the graph are depicted in the LabVIEW program. And, a trigger rate is shown; the trigger rate gives a value in hertz which shows how quickly the program is executing. For the most part, the more parts of the program enabled, the faster it runs. The controls enabler and the graph display take up the most processing power.
 
There are a couple other things in the program that are shown but do not quite pertain to the actual data acquisition. The scales of “X” and “Y” of the graph are depicted in the LabVIEW program. And, a trigger rate is shown; the trigger rate gives a value in hertz which shows how quickly the program is executing. For the most part, the more parts of the program enabled, the faster it runs. The controls enabler and the graph display take up the most processing power.
25

edits

Navigation menu