04-26-2020 06:54 AM
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
04-26-2020 07:02 AM
I believe there is no problem with my circuit, but I don't know where the problem is. Does anyone understand these. Many thanks
04-26-2020 07:25 AM
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
04-26-2020 08:49 AM
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.
04-26-2020 09:53 AM
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
04-26-2020 10:18 AM
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
04-26-2020 11:16 AM - edited 04-26-2020 11:16 AM
04-26-2020 03:05 PM
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
04-26-2020 07:40 PM
Sorry sir, i didn't know this before, thank you for your correction
04-26-2020 07:47 PM
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.