From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help required with text file handling in GPIB

Hi attached is my vi for GPIB communication with Aginelt Network Analyzer in Labview 8.
I'm saving the data of network analyser into text file(appending all the data). I wish to make some changes into it. As can be seen there is a input which asks for number of points/segments. Supposed I give that input as 201 points(it can be 401,801,1601,51,etc.) than after every 201 points data should get appended into a new coloumn and not into 202 row. Seperate coloumn should start for the whole set of 201 points, where as currently what is happening is all the data is getting appended one below the other.
Can anyone help around,
Regards

0 Kudos
Message 1 of 8
(2,508 Views)
I just tested this again and it is doing what you say you want it to do. I replaced the acquisiton loop with an array control containing 505 elements. I ran it and got a spreadsheet file with 201 rows and 6 columns. What is it that you want?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 8
(2,502 Views)
That's happening because in the quotient and remainder pallete i've kept x as constant 201 instead of a control. What actually should happen is when I pass 801 points to the no of points/segments control (assuming that case structure of GPIB runs for 100 times) there should be 801 rows and 100X2 coloumns. I.e. everytime structure is run, a new set of two coloumns is formed next to the previous one with same rows as before i.e. row 0 to row 801.
0 Kudos
Message 3 of 8
(2,497 Views)
Ok, so every time the acquisition loop iterates it produces 801 data point. By the time it completes the 100 loop, the data array going to the output loop will have 80100 elements in it. If you change the constant that now has 201 in it to 801 (or better connect it to the front panel input that sets the number of points per segment) you will get a spreadsheet with 801 rows and 200 columns. This is what you are saying you want.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 8
(2,493 Views)
Yes, Exactly that is what I wish to make...
Still trying to madify the code...
Can you help me around?
Rohit
0 Kudos
Message 5 of 8
(2,485 Views)
Here...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 8
(2,477 Views)
Except the cnstant 201 being converted into a control and an I32 converterr I don't find any differenceSmiley Surprised....
This is almost same and will do the same task...i.e. still will append the data oen below the other...Only thing i can find new is that here if I select 801 points so it sill plot for 801 and append the new data into 802 row instead of row 1...
Are you trying to convey something else...
Rohit
0 Kudos
Message 7 of 8
(2,469 Views)
This should do exactly what you want. The first loop will acquire 801 values each time it loops. Assuming that first loop runs 100 times, there will be 80100 data values in the array coming out of the first loop. This will get formatted in the following code to produce a datafile with 801 rows and 200 columns.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 8
(2,464 Views)