08-08-2007 02:53 PM
08-08-2007 05:30 PM - edited 08-08-2007 05:30 PM
Hi Bruce-
I had a discussion here with another user that experienced a similar problem. There's some good info about the Scan_In_Progress status bits. My guess is that your device is not sending an AI_Stop pulse once the scan has begun, either because the convert clock is too slow or perhaps not running at all. Can you please give some more info about how you're setting up your timing and triggering (clock divisors, any modifications to the example functions, etc)
Additionally, the 623x devices are not "officially" supported by the DDK examples, though it should be relatively easy to get them working. I would be interested to hear about any trouble you run into with the AI front end hardware configuration. Unfortunately I haven't created any 623x-specific examples yet, so I can't forsee any specific "gotchas" that you might experience.
Thanks-
Message Edited by Tom W [DE] on 08-08-2007 05:33 PM
08-09-2007 08:00 AM
08-09-2007 09:56 AM
Bruce-
Two things to try immediately jump out:
1. The convert clock polarity for 622x and 623x devices should be set to active low. For other M Series devices (currently 625x and 628x) the setting should be active high. You should change this setting in your call to aiPersonalize().
2. The adcReset() call is only necessary for 625x devices. You should comment or remove this line when using 622x, 623x, or 628x devices.
3. Once you do get the AI timing working, you'll want to update your call to aiGetScalingCoefficients(). There is a bug in the example as shipped; it configures the channel for one gain level but then reads scaling coefficients for a different gain setting. You can check which values are supported using the enums in ai.h and scale.h for the hardware gain setting and scaling coefficient settings, respectively. The 623x devices support the same ranges as the 622x devices.
Thanks-
08-09-2007 11:03 AM
08-09-2007 12:43 PM
Bruce-
Sorry for the confusion there- you're correct about the convert polarity. In order to check that you're mapping Bar1 correctly, you can hit a scratch pad register in the STC2. There's an 8-bit scratchpad at offset 0x5 from Bar1 that you can write/read. I would write a value and then check to see if you can read the same value back.
As for Bar0, if you're able to read the serial number then you have most likely mapped Bar0 correctly.
08-09-2007 01:47 PM
08-10-2007 08:02 AM
08-10-2007 08:56 AM
08-10-2007 09:15 AM
Hi Bruce-
Glad to hear you found the issue. You made the correct change to your aiConfigureChannel() call to address the issue I mentioned. If you plan to use any range other than +-10V, you'll need to make sure that the gain setting you select in aiConfigureChannel() is matched correctly in aiGetScalingCoefficients(). The allowed offsets and enum values are available in ai.h and scale.h. Otherwise, your current settings look fine.
Let us know if you run into anything else. Thanks-