LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Opening a large text file (.cwa)


@Bob_Schor wrote:

...  There is still the "decoding" problem ...

 

Bob Schor


Some notes incase you do not know about the various data manipulation options that you have available.

 

1) An array of U8's can be converted to a string using "Byte array to string".

 

2) A string indicator has three display options "Normal" "slash code" and Hex.

 

3) The data manipulation palette has functions "Join", Swap byte, and Swap words that will let you put bytes together and swap the bytes around.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 15
(676 Views)

Thanks guys, 

 

I've made progress (a little) as to opening the datasets and sets of data which should contain all data. I've been trying to decipher the open github code written for MatLab, but struggling with the next steps. 

 

The .cwa files are described here (link) from where I've been reading the large files in chunks to get the header file (initial 1024b) and the first two datapacks (512b following) from where I get the data as per VI below. 

 

Could somebody please help me to make sense of it? I believe it's going wrong where the transform of little to big endian takes place. Although I've also been playing with the promise of flattening / converting the data but I'm lost as I'm now really out of my comfort zone. 

 

Any suggestions / mods by somebody who understands this linked to the github bits?

 

Sample data can be found here: (link)

 

Current VI: 

 

0 Kudos
Message 12 of 15
(662 Views)

Hello, 

Wondering if you made any progress on this? I am also trying to load a .cwa file from axivity into labview and convert to mimick a csv file. 

 

Thank you

0 Kudos
Message 13 of 15
(310 Views)

Can their conversion program be controlled via Command Line? If so, i'd do a System Exec and convert the file and then simply read the CSV.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 14 of 15
(305 Views)

Hey KG16

 

Yep, all sorted. Bit of digging but found an old code that reads the .CWA files in straight away, but in chunks (rather than the whole file in one go)

 

Two bits to look out for:

a) install the <niusiaxivity_cwa_1.0.05724> driver 

b) <lezen V1 - onzetting naar csv.vi> is the original on which the programme below was based 

c) <Axivity Folder Analysis - Vx.vi> provides the rough structure to link it to a single and or folder analysis, whereby all Axivities were started at the same time - I've stripped it down, so you can do with it whatever you want following this. 

 

Google Drive link - click here

 

Alternatively, feel free to drop me a line on pesser at brookes dot ac dot uk and I'll fire it over directly

0 Kudos
Message 15 of 15
(267 Views)