Showing results for 
Search instead for 
Did you mean: 

How do I insert strings into an array? I tried to use the spreadsheet string to array block and it did not work.

Go to solution

LOL. Come on, guys !!!! Please read instructions or maybe I am not making myself clear enough. I am trying to remove the "MOD" from the list of channels. The program that you posted is removing the other channels and keeping the MOD. I know how to remove the "MOD", but I will have to hardcode every single non "MOD" channels, but I do not want to hardcode it like that. So basically, I want to remove the MOD from the list without doing any hardcoding of the non "MOD" channels.

I hope I am clear enough now.

This is what I did:


This is what I am getting:


This is what I was expecting to get:



0 Kudos
Message 11 of 19

Okay.  Well think about Boolean operations,  Instead of wanting something that is True,  you want something that is False  (otherwise known as NOT true).


The hint on what you can use is in that sentence.

0 Kudos
Message 12 of 19

EDIT: There is a mistake in the snippet, the Channel Name should be wired to the Delete Channel, not the "Mod" search term. Sorry.


Here's a snippet as an early holiday gift. (If you don't know what a snippet is, please look it up.)


ONE Problem: Whatever you used to make the TDMS file, please don't post it to this thread, is corrupting the file. What I am saying is your example TDMS file is problematic; use a non-corrupted file to test your VIs. Your hint that the file is bad, having to put a Clear Error after every TDMS operation.




Find out what a snippet is.Find out what a snippet is.



0 Kudos
Message 13 of 19

Oops, the comment I was about to make has already been made ...

Message 14 of 19

Don't take the wrong way, but


this thread, and the posted code, is starting to remind me of a Stephen King novel. 🙂


Kind of like that movie with Kathy Bates, what was it called?




PS How do I unsubscribe??

0 Kudos
Message 15 of 19

Lmao. You are funny. You just made my day. I forgot the title of the movie. I like this thread!!!!

Anyway, I completely understand your last posted code. So I copied it and I'm trying to verify if the the channels with "MOD" are deleted using TDMS content list. I kept getting error -2532.

Alos I do not see how you change the tunnel on the for loop to auto indexing. I right clicked on the tunnel and I couldn't disable that tunnel.

This is what I did:



This is how I wired the false part of the case structure:



0 Kudos
Message 16 of 19
Accepted by topic author GRC5000
  1. You still need to find out what a snippet is.
  2. Use array index, not delete from array.
  3. There was a mistake in my snippet, I needed to wire the channel name, not Mod, see my edited post.
  4. Error -2532 means invalid channel name or group, one due to my bad code. The other due to your file. If I just try to view your file with the TDMS viewer, I get an error. Until you fix the TDMS file, I think you will have problems.





PS The movie is "Misery".

Message 17 of 19

For only the Thermocouples channel



Message 18 of 19

mcDuff!!! You and Bob are awesome. I know I get on your damn nerves, but you guys still show me love. I appreciate it. I wish I could get you guys something for christmas. You guys made my day. My problem is solved. Thanks for the constructive criticism. I will go back and review the tutorials. You, guys, are the best!!!!

0 Kudos
Message 19 of 19