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: 

Writing a .fcs file

I am trying to convert a TDMS file to a .fcs file, which is used in flow cytometry.
I am having trouble implementing this in LabVIEW, my main confusion is due to data types:

I have a 2D array of DOUBLEs, which I get from the TDMS file. According to the specifications, data in a .fcs file can be stored in multiple ways, including as "unsigned binary integers" and doubles (see page 14).

I am writing the HEADER and TEXT segment to a binary file as strings, which should be fine.

But how do I  write the 2D array?

Ideally I want the datatype in the file to be DOUBLE, which I can specify by setting the keyword '$DATATYPE' to the value 'D'. Does this mean I can just wire the 2D array into the "data" port of the "Write to binary file"-subvi? Surely not, since the array will also write some array specific delimiters which will corrupt the bit stream of my data to give 'ghost values'.

In the attached vi, I rearrange the 2D array into a 1D array, by appending the rows of the array one after the other. Then I type cast this into a string, which gives me a pure ASCII qword (64 bits) for each number. Is this how it should be done? I've reached the llimit of my interpretation of the documentation (in the link above) and can still not get my files to be recognised by file readers (such as this one).

Kind Regards

Message 1 of 7
(2,811 Views)

Hi,

did you have a look at the FCS 3.0 DataPlugin? http://www.ni.com/example/27643/en/

 

Using DataPlugins: http://www.ni.com/tutorial/11951/en/

 

Greetings

0 Kudos
Message 2 of 7
(2,707 Views)

Hi Dough,

Did you manage? I tired the data plugin as well. At first it seemed to work but then when I tired to open the file using FloJo or another cytometry analysis program, the replied there were no events in the distribution.
You seemed to be on the right track. 

 

Best regards,Arjan

0 Kudos
Message 3 of 7
(1,594 Views)

I did try the data plugin but I ended up with 0 events when opened in FlowJo. There is little documentation on this specific plugin. Do you know who wrote this software?

0 Kudos
Message 4 of 7
(1,574 Views)

Hi, Have you soulved that?I have the same problems

0 Kudos
Message 5 of 7
(818 Views)

Reading is fine now. I did not continue trying to write an FCS. 

0 Kudos
Message 6 of 7
(770 Views)

Thanks for reply!Great to hear that. Can you show your VI?

0 Kudos
Message 7 of 7
(742 Views)