03-30-2011 07:58 AM
Hi,
i'm trying to plot waveform of a square signal from Lecroy WavePro 7300A in LabWindows CVI.
i often get incomplete waveforms (bad.bmp), rarely get proper plots (proper.bmp),
i wrote my code in IviScope that is example program of VCI , tried both of readWaveform and fetchWaveform
functions, but results didn't change.
i couldn't figure out the essential reason of the problem, tried different configurations..
any idea about this?
thanks
03-30-2011 01:18 PM
Hello Sahin,
If you use the IVI example without any modifications does it give you the right waveform?
I am able to run the IVIscope example with no strange results. I get a nice display every time.
I changed most of the settings to try to reproduce this but had no luck.
What parameters are you sending with the readWaveform and fetchWaveform functions?
Regards,
Leonard Brown
Application Engineer
LeCroy
03-31-2011 01:39 AM
hi,
Iviscope i used to configure the scope gives out the same results without any modificarion
(that is in the directory: ...\ National Instruments \ samples \ IVI \ IviScope), i atteched arbitrary results
of this program.
i use this function -as in the example program- with a little changes in order for waveform transfer:
IviScope_ReadWaveform (instrumentHandle, channelName, waveformSize, maxTime, waveformArray, &actPoints, &initialX, &XIncrement);
waveformArray is defined of 10000 elements globally in the origional program. When i get improper results, i defined it as a pointer in the same
variable type (ViReal64) and mallocate before sending the fnc above, but i got same waveform results.
also i have another situations that can be the main reason of the problem:
1- oscilloscope always gives error at initializaitons, we see error message on the "Event Logs" Window:
error: command <VBS? return=app.Acquisition.Horizontal.Dbi2Active> at token <>: parameter cannot be interpreted by this command
although this error is seen on the scope screen program executes, configurations are implemented (with an exception vertical range configuration), and waveform is plotted-sometimes incomplete.
2- also Lecroy cannot configure channels' vertical range correctly in this program, it always configures vert range
1/8th of the value i send with configuraiton function, so i multiplies the value by 8 before sending it with channel configuraiton fnc,
it's about scope or the IviScope example program?
thank you very much for your regards..
03-31-2011 02:05 AM
sorry,
the problem i mentioned in paragraph 2 about scope is due to misunderstanding about the configuration
fnc of IviScope example program, it's not an error. so, i'm revising my quesiton:
Iviscope i used to configure the scope gives out the same results without any modification
(that is in the directory: ...\ National Instruments \ samples \ IVI \ IviScope), i atteched arbitrary results
of this program.
i use this function -as in the example program- with a little changes in order for waveform transfer:
IviScope_ReadWaveform (instrumentHandle, channelName, waveformSize, maxTime, waveformArray, &actPoints, &initialX, &XIncrement);
waveformArray is defined of 10000 elements globally in the origional program. When i get improper results, i defined it as a pointer in the same
variable type (ViReal64) and mallocate before sending the fnc above, but i got same waveform results.
also i have another situations that can be the main reason of the problem:
1- oscilloscope always gives error at initializaitons, we see error message on the "Event Logs" Window:
error: command <VBS? return=app.Acquisition.Horizontal.Dbi2Active> at token <>: parameter cannot be interpreted by this command
although this error is seen on the scope screen program executes, configurations are implemented , and waveform is plotted-sometimes incomplete unfortunately.
it's about scope or the IviScope example program?
thank you very much for your regards..
04-01-2011 04:35 AM
Hello sahin,
The error message you are getting on the oscilloscope references the Dbi2Active function, which page 1-25 of the Automation Command Reference Manual describes as:
Specific to SDA9k, SDA11k series of the scope.
Sets/Queries status of Channel 1 & 2. When set, C1 is inactive and C2 is configured for full bandwidth
of the scope. When cleared, C1 and C2 both are configured for 6 GHz of bandwidth.
Do you see the same waveform problems on both channels? Have you tried viewing waveforms with another program to see if you get the same results?
You could do some tests with the WaveStudio software, and if it gives the same results then it is likely a problem with the oscilloscope.
Regards,
Brandon V.
Applications Engineering
National Instruments
04-01-2011 06:31 PM
Hi Sahin,
You can ignore the error due to the DBI2. When PacificMindworks developed the LeCroy IVI driver, they were asked to make it work for all of the LeCroy Xstream scopes. A couple models need to have this command sent (as "Kraken" pointed out) to enable all of the channels instead of only two of them. Not all of the LeCroy scopes use this command to disable DBI so when you get this error, you can just ignore it.
As for the data being truncated, It has to do with the Array Size in the code.
I am not that familiar with LabWINDOWS so I am not sure where to go to adjust this but I can setp my scope for longer records and see that the data is truncated.
Look at the Timebase annotation box to see how many data points are actually on the display, and then adjust the code accordingly.
The Timebase annotation box is at the bottom right side of the grid and indicates the T/div setting, number of samples, and the sample rate.
I hope this helps.
Leonard Brown
Applications Engineer
LeCroy