LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa data read on >0

Hi cbutcher

 

Basically the aim is to read in a frequency range from a device. The device outputs 255 frequencies at 200ms intervals in a loop at this first test stage (8 bit DAC generated VCO)

 

I need the VI to perform the following:

 

1) Wait for first frequency measurement >0 (ASCII first 12 bytes) and then read frequency after 100ms. This is to allow the measurement to be made at centre of time period which is 200ms wide (1st loop) after test device is powered.

2) Repeat reading frequencies thereafter every 200ms (2nd loop)

3) Stop reading frequencies after 255 measurements

4) Read data into notepad ( test.txt file present setting) but preferably into a defined Excel file starting at A1, B1,C1 etc.

5) The data, at present, is transferred into an Excel file from the test.txt file and converted to HEX, by using a Macro.

 

Think I have the basics but as you say at present the first loop is not right. I need the >0 detection to be this loop.

 

regards

 

Trevor

 

0 Kudos
Message 11 of 22
(545 Views)

Is there anyone able to assist or recommend a tutorial for utilizing VISA in a data capture environment? 

Any help appreciated 

 

 

0 Kudos
Message 12 of 22
(511 Views)

Hi Compolitus,

 


@Compolitus wrote:

I need the VI to perform the following:

 

1) Wait for first frequency measurement >0 (ASCII first 12 bytes) and then read frequency after 100ms. This is to allow the measurement to be made at centre of time period which is 200ms wide (1st loop) after test device is powered.

 

Think I have the basics but as you say at present the first loop is not right. I need the >0 detection to be this loop.


I already told you (two weeks ago!) to use a WHILE loop for step 1. CButcher told you a one-iteration-FOR-loop is wrong -  and it's not what I told you to implement…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 22
(507 Views)

Hi GerdW

 

Thank you for your time and the quick reply. Yes,  I did get your recommendation but do not know how to insert into my Vl? 

I did ask if you could show example but you might have missed the message or not had time? 

Please forgive my ignorance but I am trying to emulate a test program that is no longer available. I am a “hardware” guy and not a programmer and I am struggling to use Labview for the first time! 


I asked a Labview sales agent for assistance but got no help at all!! 

Best regards

 

Trevor 

0 Kudos
Message 14 of 22
(501 Views)

Hi Trevor,

 


@Compolitus wrote:

Yes,  I did get your recommendation but do not know how to insert into my Vl?


Similar to this:

 


@Compolitus wrote:

I asked a Labview sales agent for assistance but got no help at all!!


You should not talk to Sales, but to AEs (Application Engineers) when you want support from NI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 22
(498 Views)

Hi GerdW

 

Thank you. I will give that a try and let you know how I get on. 

The agent I asked to  help was recommended by NI UK Head office! 
Apparently as I did not buy through agent they told me they could not assist. ! 

Apart from you guys I had a lot of excellent help from an Agilent engineer, the company  who supplied my USB to GPIB interface. 

Regards

 

Trevor 

0 Kudos
Message 16 of 22
(490 Views)

Hi GerdW

 

which palette is the VI that is fed from the VISA read VI located. I cannot find it?

 

Regards

 

Trevor 

 

 

0 Kudos
Message 17 of 22
(445 Views)

Hi Trevor,

 

that function receives a string from VISARead, so I would start looking for it in the String functions palette…

Spoiler
ScanFromString
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 22
(443 Views)

Thank you. 

regards

 

Trevor 

0 Kudos
Message 19 of 22
(441 Views)

Hi GerdW

 

Unfortunately that did not work due to the input being a string and the >0 VI has a decimal input. Not sure if the input can be  converted?

 

Many thanks for the help 

 

Regards

 

Trevor 

 

0 Kudos
Message 20 of 22
(427 Views)