10-30-2013 05:38 PM
I've been working on custom DPO 4000 series drivers based off the official driver and have run into a few problems speaking to the scope. One of which causes the waveform to freeze(I can still move curors and change scales, however it is seeing an old waveform is not changing.)
One problem at a time though. I am trying to read the cursors by polling them every 30 seconds to see if there has been a change. However, in order to get the appropriate data I have to run the code below twice. If I only run it once I get dummy/old data back.
I figured I could flush/clear the buffer before to get the correct data but it does not seem to work or I just do not know enough about the I/O buffer.
Has anyone else had this read cursor issue and/or have a solution to this?
Thank You
10-31-2013 06:49 PM
Hi cscansin,
Please remember when you use VI snippet, also include an earlier version VI for those that do not have access to LabVIEW 2013.
I've taken a look at some of the drivers provided for the DPO 4000, have you tried to model your program based off of their programming technique?
It seems that there may be some overlap between what you'll need for your application and what the driver can help us do.
Regards,
11-01-2013 08:28 AM
Thanks Joel,
How early of a LabVIEW snippet should I provide? 2012 or something further like 8?
I did not realize you could not view snippets without access to the same version of LV, I thought it was .png(or .jpg)?
Yes, I have looked and use some of the techniques, although I should use more of the initialize .vi for my .vi.
However, I use code from the programmer's manual to read the value from the cursor, returning the data as whole such as the aquire waveform.vi the driver provides does not seem to be a problem though.
Regards,
Christian
11-04-2013 09:22 AM
Hi cscansin,
Usually either 2012 or 2011 will be sufficient. And if you are unable to provide a snippet for those versions, you can upload a VI saved in an earlier version.
What separates your code from what the manufacturers do in the example code provided?
Regards,
11-05-2013 03:35 PM
Hi Joel,
In this case my code just uses the basics of Visa Open/Close, read and write. I do not have timeouts, restarts or error handlers.
The open and close are located outside this vi outside the while loop which calls the attached vi. My goal is to run this VI every 30s and record the data, queried.
I added all those VISA clears inbetween the read/writes because it fixed the problem of getting garbage output when reading the data.
I realize, however, I should have atleast a timeout as I had error code -1073807339 which occured at the clear after running for several hours. From searching it appears that it was a timeout error and a suggestion is to increase the timeouts of the function or the amount. My code does take some time to extract those pieces of data seperately.
The onlky measurement that needs to be made serperately, IMO, is the last measurement as it is reading a maximum value within new parameters(gating with the cursors).
Any suggestions as to resolving this error?
Thanks,
Christian
11-06-2013 06:23 PM
Hi cscansin,
Try following the instructions in the Knowledge Base Article to resolve error code -1073807339
http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0?OpenDocument
Let me know what results from this.
11-07-2013 11:54 AM
Hey Joel,
Thank you, I took a look at the document and gave the recommended solutions a shot.
The problem is I get error code: -1073807331 Property Node (arg1) in .vi
I believe it is because this bit of code is meant for a RS-232 serial connection. I am increasing the timeout of the instrument as the previous error usually occurs during the VISA clear function. Although, it is inconsistent as to when it occurs. I have an error log and I check the data I receive and there are no flags or indications as to why this error happens.
Christian
11-08-2013 05:22 PM
Hi cscansin,
Try setting up your VISA read with a termination character enabled and also with Suppress End Enabled:
This white paper should be useful:
http://www.ni.com/white-paper/4256/en/#toc2
Regards,