LabVIEW Digest Programming Challenges

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

LabVIEW Digest Challenge 3

Hi Everyone and welcome to this quarter's LabVIEW Digest Challenge. This time we're opening it up to LabVIEW NXG entries for the first time so if anyone fancies practising their NXG skills, this is the time to do it! As always, there's a free certification exam of your choice up for grabs!

 

Email your entries to LabVIEWDigestCompetition@ni.com

I will not be accepting entries posted on the forum page.

 

For this challenge, we’re going to be building a program to de-crypt Morse code. The program should be able to translate any Morse code but I have included a short sentence below to test it.

‘-’= dash

‘.’ = dot

‘ ’ = separates letters

‘/’ = separates words

- .... .. ... / -- --- -. - .... .----. ... / -.-. .... .- .-.. .-.. . -. --. . / .. ... / - --- / - .-. .- -. ... .-.. .- - . / -- --- .-. ... . / -.-. --- -.. . / .-- .. - .... / .-.. .- -... ...- .. . .--  

 

Closed Date: Saturday 30th September

Please note the competition is only open to LabVIEW users in Europe, Middle East, India and Africa. 

Competition Rules

 

Please use one of the attached VIs. 

 

Good luck,

Charlotte

0 Kudos
Message 1 of 13
(4,821 Views)
12 REPLIES

Re: LabVIEW Digest Challenge 3

Hi Charlotte,

 

Is this only open to users with LabVIEW 2017? I ask because my version (2016) will not open the VI.

 

Many thanks,

Pete.

Message 2 of 13
(4,365 Views)

Re: LabVIEW Digest Challenge 3

My mistake, 2010 version added! Thanks for letting me know

0 Kudos
Message 3 of 13
(4,363 Views)

Re: LabVIEW Digest Challenge 3

Hi everybody

This is my solution.

Greetings from Switzerland!

0 Kudos
Message 4 of 13
(4,306 Views)

Re: LabVIEW Digest Challenge 3

Hi BrotherTom, 


Could you please email your VI to LabVIEWDigestCompetition@ni.com? 


That way I can keep all entries together and pick one at random much easier Smiley Happy

 

Thanks,
Charlotte

0 Kudos
Message 5 of 13
(4,302 Views)

Re: LabVIEW Digest Challenge 3

Since I am in the US, I am not qualified to enter, but your example string seems incorrect unless you say that:

 

  • ‘ / ’ = separates words (notice the spaces on each side!)

 

If we define it as "‘/’ = separates words" (no spaces), the example string should instead be:

 

- .... .. .../-- --- -. - .... .----. .../-.-. .... .- .-.. .-.. . -. --. ./.. .../- ---/- .-. .- -. ... .-.. .- - ./-- --- .-. ... ./-.-. --- -.. ./.-- .. - ..../.-.. .- -... ...- .. . .--

Of course well written code should be able to handle extra spaces... Smiley Very Happy

 


LabVIEW Champion Do more with less code and in less time
0 Kudos
Message 6 of 13
(4,238 Views)

Re: LabVIEW Digest Challenge 3

Hi everybody,

my code runs with the Morse string proposed by Charlotte, with the spaces before and after the words separator.
If something change about that, I will change my code, but I will be happy to know what is the decision about this question!!

Thanks!

Phil

0 Kudos
Message 7 of 13
(4,136 Views)

Re: LabVIEW Digest Challenge 3

Oh good spot! I should have defined my list of different characters as ' / ' which I will update now.

 

However, I will accept either solution. 

 

When I coded my own solution I used ' / ' as that was what was in the test string. I'm don't think that's real morse code but that's what the translator gave me!

 

 

0 Kudos
Message 8 of 13
(4,106 Views)

Re: LabVIEW Digest Challenge 3

Thanks Charlotte Smiley Wink

I sent my code this morning!!

Phil

0 Kudos
Message 9 of 13
(4,102 Views)

Re: LabVIEW Digest Challenge 3

Hi Everyone, 

 

I have been looking through the results and have selected a winner - PhilB58

 

For the first time I had to select a random winner multiple times as there were a few things that meant there were incorrect solutions. I tested them with the phrase 'THE QUICK BROWN FOX JUMPS OVER 13 LAZY DOGS?' to check numbers and punctuation. Everyone remembered to include either numbers or punctuation but not everyone remembered to include both. 

 

Here is the winning entry from PhilB58. He also included a bonus translator to turn ASCII into Morse Code which was a nice touch. 

 

 

 

Winning Code.PNGWinning SolutionWinning Bonus Translator.PNGWinning Solution Bonus Translator

 

Example 2 - great way to get the different values in.PNGExample 1 - a very elegant way to deal with inputting the Morse Code values! I would not have thought of this.

 Example 3 - NXG.PNGExample 2 - we had some NXG versions this time, this one using variants to build a Morse Code dictionary

 

Thanks to the many people that submitted entries. I think this was our highest yet!

We'll have another challenge in December. 

 

Thanks,

Charlotte

 

Message 10 of 13
(3,595 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.