LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Capturing data from Yokogawa GP20 using LabVIEW

Hello everyone,

 

I am new to LabVIEW have a question regarding a part of a program that I'm working on.

 

I am writing a program to read and save data from a Paperless recorder (Yokogawa GP20) and currently having trouble in getting the data organized in the format that I need.

 

The program uses 122 channels from the device in order to read currents and voltages.  So, I am trying to get the data from all 122 channels every second for 10 seconds to form an array and save as CSV in the following format.

 

10, Ch1, Ch2, Ch3, . . . , Ch122

9, Ch1, Ch2, Ch3, . . . , Ch122

8, Ch1, Ch2, Ch3, . . . , Ch122

.

.

.

 

* The first element in each line refers to the remaining time.

 

Your help would be highly appreciated.

 

I have attached the segment of code relating to this issue. Please let me know if more information is required.

 

 

Software, Drivers and Equipment used:

* LabVEIW Ver. 2017

* Driver: Yokogawa GX Series

VISA Resource Name: TCPIP::172.16.0.101::34434::SOCKET

* Yokogawa GP20 Paperless recorder

* Toshiba Windows 10 PC

 

 

Thanks in advance.

0 Kudos
Message 1 of 4
(3,502 Views)

You can use 'Array to Spreadsheet String' to convert your array to a delimited string (Make sure you set the delimiter to a ',' because the default is a tab.

 

You can then write this to a file using the 'Write to File'.

 

I suggest opening and closing your file outside fo the loop and only writing inside of the loop. Have a look at the 'Tab-Delimited Data.lvproj' in the LV examples 'Help/Find Examples'. This gives you a pretty good idea of how to do it.

Niatross_0-1589185083170.png

 

Message 2 of 4
(3,486 Views)

Hi Azh,

 

when you have problems to build an array in LabVIEW then you should take the training resources offered for free in the header of the LabVIEW board. And you should consider the self-paced online courses offered currently for free due to Covid pandemia…

 


@AzhStark wrote:

The program uses 122 channels from the device in order to read currents and voltages.  So, I am trying to get the data from all 122 channels every second for 10 seconds to form an array and save as CSV in the following format.

 

I have attached the segment of code relating to this issue.


On your VI:

You surely don't need to init and close the device communication with each iteration, don't you!?

There is no ElapsedTime in your VI: how do you want to create this "countdown" feature you are looking for?

 

P.S.: Is there a (good) reason you needed to post this question twice within 10mins?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 3 of 4
(3,476 Views)

I apologize for the late response as I was away from work and Thank you very much for your insight. I shall further look into the training resources. 

Yes, I later realized that Init and Close blocks only have to be used once. 

The countdown was supposed to be from 10. I'm sorry for not mentioning it on my original post. 

 

As I recall, the original post was taken down for some reason by the moderator and had to post it again and inform the moderator about the issue.

 

Thank you.

0 Kudos
Message 4 of 4
(3,379 Views)