ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

question Labview

Thanks you, It's ok.

This is my VI, I put in binary. What do you think ?  

Best regards

0 Kudos
Message 11 of 14
(1,041 Views)

Hi jp,

 

What do you think ?

You made several errors…

  • You used a different output tunnel at the FOR loop: I enabled concatenation mode…
  • Your constant at the comparison function is different: I enabled the radix display for a very good reason - you did not…
  • I did the comparison after the loop, you do is inside…
  • I placed the string constant outside the loop, you not…
  • You need to provide a code for each ASCII value. Do you know what that means? Read Wikipedia on ASCII…
  • Did you debug your VI? An ASCII "A" will give you a code of 65d (=41x = 101o = 01000101b): the PickLine will now try to pick the 65th line from your string constant. Did you provide so many lines in this string???

check.png

General hints:

- it really helps to split your VI into smaller sub-parts to allow easier debugging!

- I would place that string-to-morse conversion into it's own subVI, like shown in snippet.

- Enable the "display style" indicator for each string (constant), also for numeric integer constants…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 14
(1,038 Views)

Instead of picking the line, you can make a LUT with the actual characters with matching information. Maps would work for this as well..

 

I think it time somebody mentioned the (free) online LabVIEW courses...

0 Kudos
Message 13 of 14
(1,021 Views)

BWT, we can't see what's in that cluster with arrays...

 

The next part of the code seems to need just a Boolean true for a signal, and a Boolean false for no signal. 

 

In other words: yhe Morse code's dot\dash does not translate directly to false\true...

 

So an a (ASCII 65) would need to be •-, or "101100" I think (dot-pause-dash-long pause)?

 

Spoiler
A •-
B -•••
C -•-•
D -••
E •
F ••-•
G --•
H ••••
I ••
J •---
K -•-
L •-••
M --
N -•
O ---
P •--•
Q --•-
R •-•
S •••
T -
U ••-
V •••-
W •--
X -••-
Y -•--
Z --••
Ä •-•-
Á •--•-
Å •--•-
Ch ----
É ••-••
Ñ --•--
Ö ---•
Ü ••--
0 -----
1 •----
2 ••---
3 •••--
4 ••••-
5 •••••
6 -••••
7 --•••
8 ---••
9 ----•
0 Kudos
Message 14 of 14
(1,016 Views)