LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Seperate single/double digit String Characters in Array

Solved!
Go to solution

Hi guys,

 

I am currently working on reading Tabs from a .txt file for a guitar playing robot.

I managed to put each chord into one line.

 

Now I am trying to put everything into an array.

When I tried to remove the "-" and "|" characters I ran into a problem.

I don't know how to properly seperate each characters. When I would seperate the fields by one char each field i have a problem with numbers higher than 9, because if I have a 14 for example, they should be in 1 field. So I thought I just jump to the next everytime there is a "-" or "|". Haven't implemented the "|" to check if it worked so far.

But with my current method the problem is that it doesnt jump to the next array field when there is a number. Therefore the lines get "out of sync" 

The "|" characters should always be in one column, thats not the case with my attempt.

 

LabVIEW version: latest 2018

 

If you know a better way to do this pls let me know.

Thanks in advance,

 

SkyForCe

Download All
0 Kudos
Message 1 of 9
(2,757 Views)

Hi Sky,

 

can you convert your VI to LV2017 (or older)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(2,754 Views)

Just an idea:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 9
(2,749 Views)

I am pretty new to LabView. How do u convert your project to other LabVIEW version

0 Kudos
Message 4 of 9
(2,745 Views)

Hi Sky,

 

File menu -> Save for previous…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 9
(2,742 Views)

Here it is a LV17 version

0 Kudos
Message 6 of 9
(2,732 Views)

Thanks for your solution.

Could you pls upload your VI ?

 

I am not sure but I think the problem with your resolution is that for example the number 14 would be split apart to 1 and 4.

 

Also all letters should just be deleted. Only the numbers and the spaces between are important

0 Kudos
Message 7 of 9
(2,731 Views)
Solution
Accepted by topic author SkyForCe

Hi Sky,

 

Could you pls upload your VI ?

Sorry, didn't save that VI. But all you need can be seen in the picture…

(The learning effect is much better than just to take a ready-made VI.)

 

I am not sure but I think the problem with your resolution is that for example the number 14 would be split apart to 1 and 4.

Yes, my suggestion would do that.

 

Also all letters should just be deleted. Only the numbers and the spaces between are important

I made just a suggestion. You can improve it on your own!

Idea: You could count the "-" chars before deleting them to get the note position in the track…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 9
(2,727 Views)

Thank GerdW for the help,

 

I am gonna try to do it by counting the "-" chars.

 

Best regards,

SkyForCe

0 Kudos
Message 9 of 9
(2,708 Views)