LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Siglent 2042X Data Capture

I am trying to get frequency counter data out of my Siglent 2042X waveform generator using NI LabView 2023 Q1 (32 bit) hobbyist edition.  I am running windows 10.  I am new to LabView.  I have researched the knowledge base and tutorials but have not found a solution to the error that I am getting.

 

So far, I have set up the instrument with a USB connection and with NI MAX I am able to read and write "*IDN?/n" to the instrument without errors.  See screen shot below.

 

 

LabViewSiglentOWRCExp_R0_TestPanel.JPG

I set up a basic open, write, read, close program that develops a time-out error at the read block. See below.

 

LabViewSiglentOWRCExp_R0_Error.JPG

 

Any ideas of what I might do to fix the issue?

 

Regards,

Wes Winkler

0 Kudos
Message 1 of 6
(1,035 Views)

Did you use the correct configuration (baud rate, termination character etc)?

Anyway, there is a library and example available at IDnet (Siglent Technologies SDG2042X Function Arbitrary Waveform Ge - Instrument Driver)

Download and extract the library to <LabVIEW>\instr.lib

Open and explore the example.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 6
(1,014 Views)

You need add a VISA property node to ‘Enable Termination character’ and also need to set the termination character to the numeric equivalent to \n.

 

https://www.ni.com/en/support/documentation/supplemental/06/termination-characters-in-ni-visa.html

 

Currently what is happening is the VISA read is just waiting for 1024 characters and it isn’t getting them all and timing out.

0 Kudos
Message 3 of 6
(927 Views)

Also you need to check the string for  ‘idn?\n’ has got ‘\ codes display’ enabled.

 

https://www.ni.com/docs/en-US/bundle/labview/page/backslash-codes-display.html

 

otherwise you are not sending what you think you are sending and the instrument doesn’t understand 

0 Kudos
Message 4 of 6
(924 Views)

That did it!  thanks for the tip.  I enabled the codes display and found that there were two backslashes.  I removed the extra backslash and the program worked.

0 Kudos
Message 5 of 6
(892 Views)

@Wes_Winkler wrote:

That did it!  thanks for the tip.  I enabled the codes display and found that there were two backslashes.  I removed the extra backslash and the program worked.


Ahhhh! So you were sending a littoral "*IDN?\n" 7 characters rather than a "*IDN?" followed by the newline character 6 characters as shown in the test panel ("\\" is the escape code for a single Backslash character while "\n" is newline)


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 6
(874 Views)