Accelerometer I2C and Labjack U3 HV
Posted 29 August 2012 - 01:17 PM
Posted 29 August 2012 - 02:09 PM
Posted 31 August 2012 - 10:03 AM
Posted 31 August 2012 - 02:57 PM
I've looked at a few I2C and Daqfactory examples. One thing i notice is that there is no Register mapping/address defines anywhere in the script. for example, in C/C++ you have #define xyz_reg1 0x32 and so forth. Does this mean scripting in Daqfactory doesn't required the use of #define ? What scripting language is the Daqfactory using ? Because in my application, i need to set up registers for the accelerometer to a certain value on power up
DAQFactory uses it's own scripting language. I believe you can create variables with certain values which would act the same as #defines. For the I2C specific things there are various properties that the driver keeps track of:
Which can be set with LJ_ioPUT_CONFIG to control various I2C properties (such as the address byte).
In DAQFactory you can do:
global xyz_reg1 = 0x32
which gives similar results to C/C++ #defines.
Posted 05 September 2012 - 01:28 PM
Attached file is my 1st attempt to read acceleration to the LIS331HH via I2C using the DaqFactory scripting language . I have a few questions i would like to ask.
1. I'm using the DaqFactory free version "Express", how do i execute the script and how can i track the variables ?
2. Could anyone provide me some guidelines on how to debug the script (If any) ?
Posted 05 September 2012 - 02:40 PM
From the software side, I would post on AzeoTech's forum for ideas on debugging scripts:
If you have any experience programming, I would suggest you consider using a normal programming language rather than so much script in DAQFactory. For example, there are free C++ environments available for Windows such as Dev-C:
Posted 06 September 2012 - 10:23 AM
Posted 06 September 2012 - 11:51 AM
Posted 06 September 2012 - 12:24 PM
Posted 06 September 2012 - 12:26 PM
Posted 06 September 2012 - 01:21 PM
According to the datasheet page 18, the last paragraph stated that i need to issue a repeated start (SR) after issue a slave address plus a sub address. How can i accomplish this ?
So if you can see bus activity, then the next thing to do is analyze the I2C waveform and see if it looks correct.
Posted 06 September 2012 - 03:27 PM
Posted 06 September 2012 - 03:47 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users