Quote:
Originally Posted by tr6scott
As title suggests.
As a learning step, we were working through some of the sensor examples with the freshmen to get used to Labview and how sensors return data.
We worked through the encoder, encoder with motor, and the gyro examples, and then wired up the ADXL345 Accelerometer in SPI mode (What does SPI mean?) and we could not get it work.
We would hit the run on labview main panel, the checkerboard would go away, indicating it was running, but no data was being returned to the front panel. Bringing up the block diagram, and trying to probe any data wire, showed it was "Not executed" This was the same for the data prior to the loop, or in the loop, the whole diagram was not executed.
Turning on the light bulb showed nothing of interest either.
So if you have any idea, what I am doing wrong, let me know.
Or if you have done this example in the 2012 labview and it worked, please let me know that too, as that would confirm it was on my end.
Scott. (Mentor)
|
SPI means
Serial
Peripheral
Interface.
SPI is a digital communication standard that involves 4 interfacing wires:
- CK (SCLK) - Serial Clock, a clock signal that controls timing of signals in the device
- DI (MISO) - Master In, Slave Out, or in our case, Data In
- DO (MOSI) - Master Out, Slave In, or in our case, Data Out
- CS - Chip Select, or often called slave select (SS), selects the chip for communication, this signal has inverted logic, meaning you pull the device to logic low to select the chip as active.
Of course, that's not all... For the ADXL345, you also have 2 power wires:
- 0V - Ground (-)
- 5V - Power (PWR), which is 5 Volts
Here is a link to the
AndyMark wiring diagram for the Gyro and Accelerometer board, which shows you exactly how to connect the sensor to the Digital Side Car.
Here is a link to the
AndyMark Product Specifications for the Gyro and Accelerometer board.
Here is a link to the
ADXL345 Datasheet from Analog Devices.
On to LabVIEW...
Before executing the code, press the Highlight Execution button, and follow where the code stops. It is important to keep the block diagram open so it records what executes and what doesn't execute. If it's not open, it doesn't show you the history.
Let us know what you find.