Driver Development Kit (DDK)

cancel
Showing results for 
Search instead for 
Did you mean: 

Register Level Programmer Manual for M Series

Hello Tom ,
                 I am able to read correctly from the channels of ADC
and was able to configure DIO as per my requirements.
Thank you.

 

Hello Gaurav ,
             I am not at all hesitant to post questions.
I am in development phase right now , will post questions
as i come across .

 

As per Tom's reply, I am currently looking into G1 Gate interrupt.


If you can share more stuff on it, it can reduce my development time.

Let me know .. 

 

Thanks,
Irfan

0 Kudos
Message 11 of 18
(6,467 Views)

Hello Tom,

                 The M Series User Manual describes DI Change Detection in Chapter 6.

There is also a mention about the following

 

The Change Detection Event signal can do the following:
• Drive any RTSI <0..7>, PFI <0..15>, or PXI_STAR signal
• Drive the DO Sample Clock or DI Sample Clock
• Generate an interrupt

 

Is there an example for DI Change Detection Generating an interrupt ..

 

Let me know

 

Thanks,

Irfan

0 Kudos
Message 12 of 18
(6,462 Views)

Hello Tom ,
          As is posted earlier , I am able to read correctly from the channels of ADC ,
getting correct outputs at DAC and able to configure DIO as per my requirements.

Thanks for the support.

 

Moving on ..

 

Q1 . Can you elaborate more on the magic number 280 in aiConvert (board,280,280,kFalse);

 

Q2 . Is there a way to bit address the 24 DIO lines ?
       Operations like set P0.1 or P2.5 and reading the status of the same ..
        I am not able to get an idea about this from your previous replies.

 

Q3 . I looked into the G0 or G1 Gate interrupt discussion.


        My application has 7 Status Inputs (7 Bits) which i need to read on interrupt basis.
        The DI Change Detection Generating an interrupt suits my requirement .
        Is there any example for this case .. following the MHDDK standard ..
        Else even the steps to do it would be benefcial .

 

Happy Thanksgiving ..

 

Reagrds,
Irfan
     

0 Kudos
Message 13 of 18
(6,436 Views)
thanks a lot! I have settled this problem under your teaching.
0 Kudos
Message 14 of 18
(6,420 Views)

Hi Irfan-

 

The 280 number in aiConvert indicates the timebase divisor for creating the CONVERT clock (see STC Technical Reference Jan 1999, page 2-4) for more info.  Keep in mind that you must leave enough time between START cycles for the total number of CONVERTs to occur.  For example, for a scan rate of 10k with 5 channels you would need to choose a divisor of 2000 (20M/2000 = 10kHz) for aiSampleStart and at most 400 (20M/400 = 50kHz) for aiConvert.  More discussion about the algorithm used by NI-DAQmx for maximal inter-channel accuracy can be found here

 

P0 can only be read or written using the method shown in dioex1.cpp from the M Series MHDDK.  DIO_Direction chooses line direction (where 1=output) and Static_Digital_Input and Static_Digital_Output are used to read and write from P0.  P1 and P2 can only be read or written using the method shown in dioex2.cpp.  My discussion in this thread on 25 November shows how to set line directions and input/output for P1 and P2.  PFI_DO.writeLowerPort and writeUpperPort refer to P1 and P2, respectively.  Those ports use the PFI interface and can not be addressed in the same manner as P0.

 

Digital change detection is not supported in the MHDDK at this time for M Series.

 

Let me know if you have any other specific questions.  Thanks-

Tom W
National Instruments
0 Kudos
Message 15 of 18
(6,381 Views)

Hello Tom,         

               Thanks again for the support. 

 

Some other questions: 

 

1. The last bit value of '1' corresponds to output and a value of '0' corresponds to input in PFI  select.   

     What does bits 0-3 corresponds to?

 

2. I have connected an Analog Output to an Analog Input.    

    When I am writing data to the Analog Output, it’s perfectly correct when measured (say 5V).    

    But when the same value is read back via Analog Input, Its is not that exact (4.9XX V).   

    How can I increase the accuracy of Analog Input? 

 

3. My application has 7 error status inputs (7 Bits digital), which should be creating an interrupt.   

    If the Digital change detection is not supported in the MHDDK,    

   At least is there any example pseudo code for Change Detection Generating an interrupt ..   

   Else , Recommend the steps to be followed.   

  This is the last and important part of the implementation of my application 

 

Thanks,

Irfan

Message Edited by irfanm on 12-02-2008 03:59 AM
0 Kudos
Message