LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Save & Recall setup

Hi Craig,

I have tried both backslash \ and forward / , but it still doesn’t work. The error that it gives me is invalid character data, invalid enumeration. I have tried googling the possible causes of the error, but I am still unable to solve it. Could it be that there is a missing function that is not present in the program?

Indeed, I have tried using the Save-Recall setup VI as well, but I am unable to find out more information on the types of inputs that are allowed into the VI. Does anyone have any clue where I can find out more information on DPO 4034B library functions ?

 

Thank you very much!

 

0 Kudos
Message 11 of 33
(1,246 Views)

Hi Bob, will it be possible if you can provide the links where you found the videos, as I have not been able to find videos related to what I need for my program? Your help is greatly appreciated! 😄

Both my colleague and I have been thinking and exploring different ways that might work, but still unable to find a suitable solution.😅

0 Kudos
Message 12 of 33
(1,240 Views)

Please try the following..

tek_dpo_mso_4034B.png

 

It attempts to first save a setup to the scopes internal memory location #1, then it queries the working directory and retrieves a file listing, next it tries to save a file to the current working directory, then retireve the listing of files again to see if the file was saved.  Note that I thru in a few simple time delays.  If you read page 3-7 of the manual it says that saving and retrieving files can take some time and that generally these sorts of operations should be handles using the event registers in the instrument to make sure operations are complete before proceeding to the next operation.  I don't want to learn the scopes event structure and worry about that right now, so I just added time delays. I'm not sure how slow the scope is, but it might be a good idea to set longer delays and longer timeouts if you get error messages when retrieving long lists of filenames.

 

Craig  

Download All
Message 13 of 33
(1,227 Views)

Did you try typing "DPO LabVIEW" (without the quotes) into Google?  Here's one of them that shows up:

You-Tube Video

 

Bob Schor

0 Kudos
Message 14 of 33
(1,217 Views)

Hi Craig, thank you for the VI that you have provided and it totally works! But, I would like to know what is a current working directory and how it exactly works? I have tried finding it online but I still don't exactly get how this current working directory works. Does it work in a similar way as the other forms of directories?
And just another question, while I was running the VI, an error popped up stating that there was a missing media. Is the "media" that they are referring to a thumbdrive?

Thank you!

0 Kudos
Message 15 of 33
(1,196 Views)

Hi Bob, while I was watching the video, I realised that I had watched it before!Smiley Very Happy But anyway, thank you for the sharing the link!

0 Kudos
Message 16 of 33
(1,196 Views)

Glad it worked.  I don't have your model scope so I can't verify the code or debug.   When does the error occur?  You can use highlight execution to determine in which VI the error occurs.  Did deeper in that subvi for further hints.  Post results if you need help.

 

I'm not sure to what media it refers - usb, buit-in memory, etc...  I'm also not sure how to specify or determine the current working directory but it sounds a lot like a Linux term for the directory that the user is currently working in. I'd search the manual for more info.  I suspect the driver VIs might also allow you to set it.

 

Have you tired modifying the code to first save and then recall a setup.  Perhaps do a rest in between so the setup is lost then re-established.  I'd definitely set the timeout and delays to something like 10s before attempting.

 

If that works then you can work on using events status registers to speed up the execution of commands.

0 Kudos
Message 17 of 33
(1,156 Views)

I agree with Craig that "current working directory" probably means the directory that is implicitly chosen if you don't specify a folder.  LabVIEW wants a full Path specification (an Absolute Path, not a Relative Path), so you need to provide folder information, so I don't think it has an easy means of defining this.  There are some VIs in the File I/O Palette's "File Constants" sub-Palette that might give you a starting point, and once you have a "starting Path", you can navigate up and down using Build Path and Strip Path.

 

Bob Schor

0 Kudos
Message 18 of 33
(1,142 Views)

I had a look at the "VI tree.vi" for the driver.  This is a listing of all the VIs that make up the driver for the scope.  Its a nice place to start learning what features of the scope are programmable. 

 

In there is a VI for setting the Current Working Directory.  That same VI can also be used to create new folders.  Bob has pointed out the right LabVIEW VIs for you to use to parse and assemble directory paths, just turn them back into strings for the  driver VIs (LabVIEW has a path to string VI for that!).  So now you should be good to go! 

 

But post your code again if you get stuck.

 

PS - Error in my last post.  >> "Perhaps do a reset in between .." 
tek_cwd.png

 

0 Kudos
Message 19 of 33
(1,137 Views)

2E93626D-9D08-4A89-89D1-90AC3884182F.png

Hi Bob and Craig, thank you for the advice! I will give it a try and let you all know the outcome! But I would just like to ask, if I have a recall-save setup created, and I have a configure to channel as shown in the above image (2nd VI after the initialize VI), will configuring to channel overwrite the setup that was previously recalled-saved?

 

Thank you!

0 Kudos
Message 20 of 33
(1,121 Views)