The myRIO‑1900 is a tool you can use to teach and implement multiple design concepts with one reconfigurable I/O (RIO) device. Featuring I/O on both sides of the device in the form of MXP and MSP connectors, it includes 10 analog inputs, six analog outputs, 40 digital I/O lines, WiFi, LEDs, a push button, an onboard accelerometer, a Xilinx FPGA, and a dual‐core ARM Cortex‑A9 processor. You can program the myRIO‑1900 with LabVIEW or C. This WiFi-enabled version allows for fast and easy integration into remote embedded applications. With its onboard devices, seamless software experience, and library of courseware and tutorials, the myRIO‑1900 provides an affordable tool that helps students and educators complete real engineering projects in one semester.
Since this is my first project using myRio board I chose to build a Real-Time Application instead of a FPGA Application.
The project includes 6 VIs and a library of network-published variables.
In the main VI(Untitled 4), which runs on PC level, I'm reading the input from the keyboard (Up Arrow, Left Arrow, Down Arrow, Right Arrow, Space). I store the values of the keys into network-published variables in order to pass them to Real-Time VI which runs on myRio ARM processor.
Using the function int16_t GetKeyState from user32.dll library it is possible to read if a key is turned on or off. The int16_t GetKeyState function has as parameter the VK (virtual key) of the key. (i.e int16_t GetKeyState(int16_t nvirtkey). For instance, the virtual key of Space button is 32.
In the "sageti control.vi" I can read the state of a key and send the information to myRio. Using a state-machine architecture, I managed to control the DC motors in real time without delays.
Using the PWM function we can control the direction and speed of the motors.
Sensor.vi : I supply a short 10 uS pulse to the trigger input to start the ranging.The module will send out an 8 cycle burst (I found out it lasts for 200 uS) of ultrasound at 40 kHz and will raise its echo.
Comments
Please log in or sign up to comment.