LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview RS232 Hexadecimal to Number Conversion

I was using the 2D array because I thought it would be a seamless transition from splitting array elements and then graphing, as the graph requires a 2D array. I switched over to using the 1D array as the input to my array subset function and it seems to work better.

I now have the 1D array going into the array subset input, splitting the element index I want, then using the insert into array function to combine all elements into one array, and finally using build array to be able to graph. This has fixed my problem and now I am able to plot the elements I want, on the graph that I want.

ReadGasData2.PNG

I am not using the Express VI's in this program, I was just trying to show what I did in a different program with a DAQ module and DAQ assistant VI. I was having trouble splitting signals and didn't think I would be able to export to excel as easy as I did in my other program. I am still looking into the saving/exporting function, but wanted to see if anyone had some recommendations.

I've attached a 2020 version of my most updated VI.

0 Kudos
Message 11 of 15
(615 Views)

Hi Luka,

 

please learn basic array handling!

  • When you want to index elements of an array then you should use IndexArray!
  • When you want to build an array then you should use BuildArray!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 12 of 15
(607 Views)

See if this can give you some ideas.

 

altenbach_0-1658938966689.png

 

Message 13 of 15
(602 Views)

I think I see what you meant with the arrays now. I've managed to figure out how to export and save my data, but it is not without issues. Unfortunately I don't have much time to spend on this anymore, but I think it's good enough for what I need. Thank you to everyone that's helped!

Most recently updated VI is attached if anyone would like to see:

ReadGasFinal.PNG

I'm not sure which one of these posts to mark as the accepted solution, as they were all very helpful.

0 Kudos
Message 14 of 15
(582 Views)

@luka.zz wrote:

I think I see what you meant with the arrays now. I've managed to figure out how to export and save my data, but it is not without issues. 


 

You are still very unfamiliar with array handling. Here are some minor corrections that could make a big difference in the result:

 

After scaling, your data has two decimal digits, so formatting it as integers seems wrong. Use "number to fractional string" instead. Since you are writing strings to the file, a %f format is completely wrong. It will screw up your date and time columns irreversibly. Use %s!

 

You should only write headers if the file is initially empty. If you want to start out with a new file with each run, set append=F when writing the headers. Much better would be some extra code using the explicit file dialog so you can decide what to do.

 

altenbach_0-1659020142444.png

 

Message 15 of 15
(571 Views)