06-07-2023 10:40 AM
Hi,
I'm using myRIO obtain the encoder A,B phase data(1024P/R) to calculate the postion and RPM with motor, use the myRIO → Encoder.vi
to get the Counter value and direction, but have a problem that rotate 360 degree but counter value get more than 1024.
I don't know what happend, need some help
and another question is, I have a DAQ 9215 + 9171, but I can't use DAQ-assistant to easily get the angular position like the Youtube video,
Is my DAQ didn't support to do that?
Thanks you,
Harry
06-16-2023 09:30 PM
Both the myRIO and the cDAQ system (9171 with the 9215) are both examples of LabVIEW Real-Time peripherals, running some version of the LabVIEW Real-Time Linux OS. When submitting code (thank you!) for such systems, it is helpful to send the entire Project (right-click the Project folder, choose "Send to:", "Compressed (zipped) folder", and attach the .zip file).
When I try to open your VI, everything is OK until I try to open the Express VI to understand the problem, and LabVIEW tells me "the target doesn't support this Express VI". It is looking for this VI to be in a LabVIEW RT Project. I could create one, using my own myRIO, but it would be better for me to see your code in your Project's context.
I suspect you are having a similar problem with the cDAQ. Could you provide me with a reference to the YouTube video so I can understand what you are trying to do? [I again suspect the problem is the Project context is missing].
Bob Schor
07-03-2023 03:46 AM
Thanks for your reply,
For MyRIO, I use the method like the video: https://youtu.be/gs3Zb3VbhN8
but I got the wrong number on Counter Value (Use encoder OEW2-1024-2MHT-050-00EA)
have 1024P/R, but I got more than 1024
For DAQ, I try the method like the video: https://youtu.be/YGRKAxjYDes
want to get the Angular postion
but for my DAQ(9171 and 9215) doesn't find the I/O can use for that in DAQ assistant
Here is my VI code for my question
about MyRIO, can open the -- byMYRIO.vi --
and -- Test01.vi -- that I use the another way to count value, have good result by only a little error for 1024P/R
but I have no idea to calculate A/B phase the direction for rotation
about DAQ, can open the -- byDAQ.vi --
but I can't find the funtion that I want to use, so this VI doen's work.
Thanks, I really appreciate for your relpy.
07-03-2023 07:47 AM - edited 07-03-2023 07:47 AM
The myRIO digital inputs are direct inputs without any filtering at all. You most likely want to have some bounce filters implemented to avoid the fast FPGA code to detect additional edges while the actual encoder switches from high to low and vice versa. This could be implemented as simple RC filters on the input but I prefer to use a programmable input bounce filter on the input lines directly in the FPGA code itself.
07-03-2023 09:31 AM
Unfortunately, I do not have your hardware, and do not have CompactDAQ drivers installed on my system. But here are a few things you should try:
As it happens, I'm about to use some Counter/Timers on a USB-6212. I really dislike the Dreaded DAQ Assistant (which I call the DDA), and stopped using it within a year of its being introduced. Go on the Web and find "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications" (or something close to that title) and learn that for most things, you only need 3 or 4 DAQmx functions, especially once you learn how to configure Channels and Tasks (you can do that in the Project).
Here's my current MAX configuration. The simulated cDAQ is shown in yellow. You should see it in "shades of gray" on your system, and should be able to run some Test Panels and get simple DAQmx tasks to run.
Bob Schor