LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

myRIO Analog input err

Hi,everyone

 

I encountered some problems. When using myRIO to read the analog quantity, a problem occurred. The values of A / AI0 and B / AI0 are exactly the same. Because I need to read the values of two same sensors at the same time, but the circuit can only be A, B / AI0. There is no problem in testing the sensors separately. Once the values of the two sensors are read at the same time, data errors will occur.
help me
Thanks

 

0 Kudos
Message 1 of 13
(2,590 Views)

I believe there is no problem with my circuit, but I don't know where the problem is. Does anyone understand these. Many thanks

0 Kudos
Message 2 of 13
(2,576 Views)

The problem is either Hardware, Software, or Connections.  The one we can provide the most help with is Software.  Would you like us to "guess" at your code?

 

I assume you are using the myRIO Toolkit, and have build a myRIO Project.  Compress the folder containing all of the myRIO code you are using to read your Analog inputs and attach it to your Reply.  Without knowing what you have done, we can't tell you how to fix it.

 

Bob Schor

0 Kudos
Message 3 of 13
(2,562 Views)

NICK4457_0-1587908654231.png

Sorry, I cannot upload the project because there are too many files, but I just used the program in this picture to read it. There is no other program. The sensor is Sharp's IR. The sensor power supply is additionally supplied.

 

0 Kudos
Message 4 of 13
(2,536 Views)

I will not work with pictures.  I can't read the teeny-tiny print, I can't expand the Express VIs, I can't run the code on my own myRIO, etc.

 

Post your code!  Please.

 

Bob Schor

0 Kudos
Message 5 of 13
(2,528 Views)

I'm really sorry, this is my code, the same result has been tested just now, thank you for replying to me, this is my first time posting in the forum. thank you very much

Download All
0 Kudos
Message 6 of 13
(2,521 Views)

Hi Nick,

 

when asked to upload your files you should ZIP them - don't use proprietary software like RAR for something where you can use Windows-built in software…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 13
(2,514 Views)

I ran your IR routine on my own myRIO with nothing connected to any of the myRIO inputs.  A/AI0 showed changing values around 35, and B/AI0 showed changing values around 122, clearly different (and rapidly changing, hovering around these values).  Maybe I should plot it ...  Interesting -- if I plot the output, there is a large spike at the beginning (as high as several thousand) that quickly (I'd say 0.2 seconds) drops down to the 35 & 122 values.  Looks (to me) like the code might be working correctly ...

 

Bob Schor

0 Kudos
Message 8 of 13
(2,491 Views)

Sorry sir, i didn't know this before, thank you for your correction

0 Kudos
Message 9 of 13
(2,473 Views)

Yes, sir, my code was available before, but there was a problem yesterday. Since I currently only have two myRIOs, and both of them have this kind of problem, I cannot troubleshoot, but I observed two IO is switching very fast, really fast. Maybe I should upload a video.

0 Kudos
Message 10 of 13
(2,471 Views)