LabVIEW Digest Programming Challenges

cancel
Showing results for 
Search instead for 
Did you mean: 

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 17
(13,364 Views)

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 17
(12,906 Views)

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

0 Kudos
Message 3 of 17
(12,905 Views)

Hi everybody

This is my solution.

Greetings from Switzerland!

0 Kudos
Message 4 of 17
(12,848 Views)

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 🙂

 

Thanks,
Charlotte

0 Kudos
Message 5 of 17
(12,845 Views)

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... 😄

 

0 Kudos
Message 6 of 17
(12,781 Views)

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 17
(12,679 Views)

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 17
(12,648 Views)

Thanks Charlotte 😉

I sent my code this morning!!

Phil

0 Kudos
Message 9 of 17
(12,644 Views)

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 SolutionWinning SolutionWinning Solution Bonus TranslatorWinning Solution Bonus Translator

 

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

 Example 2 - we had some NXG versions this time, this one using variants to build a Morse Code dictionaryExample 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 17
(12,137 Views)