Showing results for 
Search instead for 
Did you mean: 

Teledyne LeCroy Wave Series - Wordwrap at the end of "Saved Filename"

Go to solution


I found a little "specialty" or "bug" in the Teledyne LeCroy LabVIEW Driver for Wave Series oscilloscopes for LabVIEW 2017. Since I did not find an existing thread to this topic, I want to present you a really simple workaround for the problem to prevent you from wasting a lot of time (like I did) searching for the problem.


I use LabVIEW Full Development System 2017 32Bit with VISA version 17.5 on Windows 10 Enterprise 64Bit.

A remote PC communicates via VICP (VICP Passport V1.12) via Ethernet/TCP/IP with a Teledyne LeCroy WaveRunner 104Xi Oscilloscope.

As mentioned above I use the Teledyne LeCroy LabVIEW Driver for Wave Series oscilloscopes for LabVIEW 2017.


The example VI described in the following is attached to this thread.


When the example VI starts, the LeCroy-VI „Configure Save Waveform“ is called and a waveform is aquired. The waveform is saved locally on the oscilloscope' hard drive and shall be transfered via the LeCroy-VI „Transfer File“ to a path on the remote PC. Additionally a screenshot of the oscilloscope's Display shall be captured and transfered via the LeCroy-VI „Screen Capture“ to the same path on the remote PC.


To not modify the filename manually for each new measurement/trigger event (the oscilloscope uses an index which increments on each new save-command) the filenames for the the Parameters „Dest Filename“ for the LeCroy-VIs "Transfer File" and "Screen Capture" are programatically build using the following parameters:

  • „Path to measurement files (local)“, STRING from the frontpanel of the example VI
  • “Path to measurement files and screenshots (remote)”, PATH from the frontpanel of the example VI
  • „Saved Filename“, STRING from the LeCroy-VI „Save Waveform“

The parameter „Source Filename“ of the LeCroy-VI „Transfer File“ is also build dynamically using the following parameters:

  • „Path to measurement files (local)“, STRING from the frontpanel of the example VI
  • „Saved Filename“,  from the LeCroy-VI „Save Waveform“

Before I succesfully tested the LeCroy-VIs „Transfer File“ and „Screen Capture“ by connecting constants to their parameters „Dest Filename“ and „Source Filename“.


With the dynamically/programatically built paths the LeCroy-VIs „Transfer File“ and „Screen Capture“ didn't work and reported the error Nr. 1 „New File“.


The reason is that the parameter „Saved Filename“ from the LeCroy-VI „Save Waveform“ adds a wordwrap ("\r\n") at the end. For example the parameter is:



instead of:



The VI "Open_Create_Replace File" (german: „Datei Öffnen_Erstellen_Ersetzen“) from National Instruments which is used inside of the LeCroy-VIs „Transfer File“ and „Screen Capture“, then react with the mentioned error based on the wordwrap.


The workaround is to remove this wordwrap like shown in the attached screenshot. Then all works fine.


I reported this to the german Teledyne LeCroy Support. I hope they will remove the wordwrap inside of their VI "Save Waveform" within the next release of the Driver.


Note: LeCroy uses an old version of the NI-VI "Open_Create_Replace File"  (german: „Datei Öffnen_Erstellen_Ersetzen“) which is not longer supported by NI. The actual version (english name is the same, german name is: "Öffnen/Erstellen/Ersetzen einer Datei") reports the same error in this case.


Best regards,


Download All
0 Kudos
Message 1 of 3
Accepted by topic author ThomasAlias

Hi Thomas,


I would use TrimWhitespace instead of SearchAndReplaceString!

Hint: when using string constants with non-readable chars you should make the display mode indicator visible and set it to either "\-code" or "hex"…


You will find such and other bugs in a lot of those instrument drivers found in IDNet. That's why I often use them just as "starter"/template to create my own device drivers…

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 3

Hi Gerd,


thanks for the tips!

Now it seems to be just a '\n' and not a '\r\n' in the unlovely string. But I didn't check this...

I'm quite new to LabVIEW. So I don't know all the functions yet. The more I am happy about your post!


TrimWhitespace works fine and looks more cleaned up (see new screenshot)! NI knew why they developed this function... Smiley Happy


Best regards,


0 Kudos
Message 3 of 3