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: 

Writing an SPI script to display constant data output

I am very new to LabVIEW, and am currently trying to write a script to display a constant data ouput in both graph and numerical form. It is currently in the form of a loop, but I would like to make this continuously updated in real time if possible. I have been unable to observe any data output, however, my SPI pressure sensor is powered and should be providing continuous data. Any help is greatly appreciated.

 

Thanks

0 Kudos
Message 1 of 9
(1,516 Views)

I am very new to LabVIEW, and am currently trying to write a script to display a constant data ouput in both graph and numerical form. It is currently in the form of a loop, but I would like to make this continuously updated in real time if possible. I have been unable to observe any data output, however, my SPI pressure sensor is powered and should be providing continuous data. Any help is greatly appreciated.

 

Thanks

0 Kudos
Message 2 of 9
(1,511 Views)

Would you please share in  LV19 or picture of your code?

0 Kudos
Message 3 of 9
(1,476 Views)

I'm not sure how to convert to the file to a 2019 version, but if that would help and you give me instructions I'd be happy to do it.

 

 

0 Kudos
Message 4 of 9
(1,453 Views)

For a constant monitoring use while loop instead of for loop, and also I would recommend not to use express VIs, you have your initialize and close instruments in the correct manner, but your waveform indicator outside of the loop, so it will only iterate 1 time, and would have all the information collected at once.

 

Heres a simple example of waveform chart, it will help you in your implementation; waveform chart.png

0 Kudos
Message 5 of 9
(1,450 Views)

thanks for the help

 

1) I receive the following wire error when attempting to connect the data output to any kind of numeric indicator. I don't know if its specific to using an SPI output, but I've tried every kind of indicator I can think of, and nothing seems compatible.

 

2) If not express VI, can you please recommend a function to use?

 

Thanks!

0 Kudos
Message 6 of 9
(1,377 Views)

What is the name of the library being used?, it is giving you an array as an output, so probably it generating several data when called, on the polymorfic behaviour is there any other type than 1 Frame?, maybe 1 sample?

0 Kudos
Message 7 of 9
(1,373 Views)

the only other options are "automatic" and "N frames". Forgive me, but I'm unfamiliar with how to identify what library is being used.

0 Kudos
Message 8 of 9
(1,369 Views)

There's a difference between Waveform graph and Waveform chart, the graph expect an "array" input so you can connect that indicator in your output.

 

And the chart expects "escalar" inputs, if its point by point data you should use that.

 

The SPI vis are from the vendor or where did you get those vis?

 

If its N frames I think you could set the VI to give you 1 frame, then put an index array VI on index 0 and connect that to your waveformchart/escalar indicator

0 Kudos
Message 9 of 9
(1,362 Views)