Jump to content
OMRON Forums

ACC59E ADC conversion time


Ychu
 Share

Recommended Posts

  • Replies 8
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

The sample rate is set by PMAC’s phase clock. The actual conversion time of the ADC chip is very fast, it should support sample rates up to about 30KHz.

 

Thanks Steve.

Isn't the sample rate applicable only in automatic read mode? In manual read mode, the application function can set the convert code any time, wait for the ready-bit and then read the value. If I understand correctly the time it takes for the value to be ready will be just the A/D (chip) conversion time and maybe some small overhead. What I am looking for is the A/D conversion time, for instance the last A/D that I worked with had 17usec conversion time. Since I am going to make the reading from the ISR routine, it is important that the time to read is in the range of microseconds.

 

Another question is I have ACC-59E and I need to set convert code, in bipolar mode, for ADC#1 as ACC59E[1].ADCs = 8. How would I do that in the 'C' routine using shared memory pointer? The SetPmacVar() method will not compile. Even if it does, I think shared memory would be much faster than SetPmacVar() call.

 

Thanks again.

Link to comment
Share on other sites

Yun,

 

The ADC on this card is a MAX180 by Maxim. Its datasheet states that the conversion time varies between 7.5 us and 8.125 us in "asynchronous hold mode," which is what we use, I believe.

 

To access ACC59E structures in C, you can create a pointer to the card:

 

volatile GateIOStruct *ACC59E_0;

 

// Initialize it

ACC59E_0 = GetGateIoMemPtr(0); // Change 0 to whatever your actual card index is

 

Then you should be able to address any of the elements like

 

ACC59E_0->ConvertCode

ACC59E_0->ADCu

ACC59E_0->ADCs

ACC59E_0->ADCRdy

 

You can also use the library of C functions listed in the ACC-59E manual starting on page 77. This should be faster than using GetPmacVar().

 

ACC-59E Manual Link:

 

http://www.deltatau.com/manuals/pdfs/ACC-59E.pdf?id=635787783275493378

Link to comment
Share on other sites

Yun,

 

The ADC on this card is a MAX180 by Maxim. Its datasheet states that the conversion time varies between 7.5 us and 8.125 us in "asynchronous hold mode," which is what we use, I believe.

 

To access ACC59E structures in C, you can create a pointer to the card:

 

volatile GateIOStruct *ACC59E_0;

 

// Initialize it

ACC59E_0 = GetGateIoMemPtr(0); // Change 0 to whatever your actual card index is

 

Then you should be able to address any of the elements like

 

ACC59E_0->ConvertCode

ACC59E_0->ADCu

ACC59E_0->ADCs

ACC59E_0->ADCRdy

 

You can also use the library of C functions listed in the ACC-59E manual starting on page 77. This should be faster than using GetPmacVar().

 

ACC-59E Manual Link:

 

http://www.deltatau.com/manuals/pdfs/ACC-59E.pdf?id=635787783275493378

 

Thanks Charles.

By the way this manual has 71 pages if I am not mistaken.

Link to comment
Share on other sites

Yun,

 

The ADC on this card is a MAX180 by Maxim. Its datasheet states that the conversion time varies between 7.5 us and 8.125 us in "asynchronous hold mode," which is what we use, I believe.

 

To access ACC59E structures in C, you can create a pointer to the card:

 

volatile GateIOStruct *ACC59E_0;

 

// Initialize it

ACC59E_0 = GetGateIoMemPtr(0); // Change 0 to whatever your actual card index is

 

Then you should be able to address any of the elements like

 

ACC59E_0->ConvertCode

ACC59E_0->ADCu

ACC59E_0->ADCs

ACC59E_0->ADCRdy

 

You can also use the library of C functions listed in the ACC-59E manual starting on page 77. This should be faster than using GetPmacVar().

 

ACC-59E Manual Link:

 

http://www.deltatau.com/manuals/pdfs/ACC-59E.pdf?id=635787783275493378

 

Thanks Charles.

By the way this manual has 71 pages if I am not mistaken.

 

I just tried the code but getting the following compilation error.

 

'GateIOStruct' has no member named 'ConvertCode'

'GateIOStruct' has no member named 'ADCRdy'

'GateIOStruct' has no member named 'ADCs'

 

When I looked into the header file RtGpShm.h, GateIOStruct only has three members;

 

typedef struct GateIOStruct

{

unsigned DataReg[6];

unsigned IntrReg;

unsigned CtrlReg;

} GateIOStruct;

 

The structure that has ConvertCode is;

typedef struct ADCDemux

{

int Enable;

int Index;

unsigned ConvertCode[ADCDEMUX_SIZE];

int Address[ADCDEMUX_SIZE];

int ResultLow[ADCDEMUX_SIZE];

int ResultHigh[ADCDEMUX_SIZE];

} ADCDemux;

 

Then it does not have ADCRdy and ADCs.

 

Thanks.

Link to comment
Share on other sites

My mistake, sorry; some structures are available in Script, but not C, and I had forgotten these are some of them. Please use the function I wrote on page 77. It also needs the function from page 78.

 

Some elements of this card must be statically mapped in memory, which is what the functions do.

 

Note that it is not a good idea to use nanosleep() inside the ISR. I am not sure exactly what your application is, but if you could possibly begin the conversion before the ISR runs and just pick up the ADC value inside the ISR, it would be better. That way you would not need to nanosleep() in the ISR.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share


×
×
  • Create New...