From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MathScript

hi all 

 

I come from a c# background

is this bit of code below possbile to do in the math script module?

if so could someone get me up and running

thanks

 

 

nmea = "HDT,120,T";

for(var i = 0; i < nmea.length; i++)
{
checksum = checksum ^ nmea.charCodeAt(i);
}
checksum = checksum.toString(16);
nmea = '$' + nmea + '*' + checksum;

 

 

0 Kudos
Message 1 of 4
(2,156 Views)

Why MathScript? It's easily down in LabVIEW (hope, google found all C++ functions correctly):

image02.png

 

Regards, Jens

Kudos are welcome...
Message 2 of 4
(2,129 Views)

is there an interpretation tool out their for labview? hahaha

could you send me on that just to see whats going on 

im a labview novice 

 

thanks

0 Kudos
Message 3 of 4
(2,125 Views)

The picture is a VI snippet. You can copy that to a block diagram.

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 4 of 4
(2,113 Views)