LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting C code to labview

Solved!
Go to solution

Hi,

As I'm not familiar with C code, can someone please help me convert this function to Labview (8.6)? See attached txt file.

Thanks

 

Labview 8.6

0 Kudos
Message 1 of 6
(4,405 Views)

Well, you're missing a function call, so no one is going to be able to help you with that.  However, did you search for CRC?  There are tons of samples out there, including one I did here.

0 Kudos
Message 2 of 6
(4,386 Views)
Solution
Accepted by topic author Gizzmo

Here's a very direct translation.  If you know that the length parameter will be equal to the length of the array, then you don't need the length parameter and you can use an auto-indexing for loop, just trim off the last element if the "create" parameter is true.  (Snippet is LV 2009 but attached VI is saved for 8.6)

simple crc.png

Message 3 of 6
(4,373 Views)

Nathand, your solution is working as I would expect.

 

Thanks to both of you.

0 Kudos
Message 4 of 6
(4,326 Views)

is it possible to convert  c code to labview

0 Kudos
Message 5 of 6
(4,131 Views)

If you know what is happening in your C code, then it is generally possible to duplicate that same functionality in LabVIEW code.  But that is not the same as "converting".

0 Kudos
Message 6 of 6
(4,110 Views)