Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Rewriting the internal read function of hx711 Library Based on LabVIEW myrio Toolkit

Hello everyone, I've been trying to make

With hx711, I referred to the Arduino Library of hx711 and tried to program. The core function in the Arduino library is the read function, which is used to read values. In this function, analog SPI communication is used. I also compiled a read function with LabVIEW following this function.

In LabVIEW, I used the SPI function in LabVIEW myrio toolkit to replace the SPI in Arduino. But I ran into a problem when running the program. The SPI function outputs an array. I don't know how to correctly use each element in the array. Because the elements of the array read by the SPI function in LabVIEW are not the same as those read by the Arduino program, the finally collected values have problems. I didn't find an introduction to the SPI function, nor did I know what each element in the array represented. If you have relevant information or have raised similar questions on the forum before, please tell me. I also hope that you can help me see if there are still problems with my program。

CZUJYJ_0-1662453846404.png

 

0 Kudos
Message 1 of 3
(1,341 Views)

The main problems I have encountered in this program are as follows:

CZUJYJ_0-1662534391417.png

 

0 Kudos
Message 2 of 3
(1,313 Views)

Dear CZUJYJ,

 

As mentioned in this article Frames Read Returns the data frames that this Express VI reads from the SPI channel. This is the correct way of implementing SPI in LabVIEW. If you are getting different results that might be a problem of something else. Do you get your inputs exactly the same as you did for Arduino?

 

Best,
Anasei.

0 Kudos
Message 3 of 3
(1,275 Views)