K8055 time to set analog output

Hello,
I am using one of the analog outputs of the K8055 board with Dev-C++.
How long does it take for the board to set an analog voltage (by setting I mean that the output reached the desired value)?
My program set’s a value using // OutputAnalogChannel(channel, voltage) // every 20ms. The value is varying and I am planning to set the value even more often.
But what happens if the board still tries to set the preceding value?
Are the following desired values delayed by the time the board takes to set the old value?
Or will the output be a mean value affected by all values which my program tried to set in the “board responding time”
Thanks

All the values are output “as is”. No averaging, no missing values.
For instance this loop outputs all the values from 0x00 to 0xff.

for (int i = 0; i<256; i++) { OutputAnalogChannel(1, i); }
The output is nice ramp wave. The time to go through all the 256 values seems to take about 2 seconds - about 8ms / value.

I’m not sure if I got you right.
You mean the card executes a command completely before accepting another?

So if you would have this code:

for (int i = 0; i<256; i++) { OutputAnalogChannel(1, i); } for (int i = 255; i>=0; i--) { OutputAnalogChannel(1, i); }
The Output would increase till 255 (5V) is reached and wouldn’t decrease before 255 is reached
Which would look exactly like this:

The peak HAS to be 255 if I got you right.
Or if you have

{ OutputAnalogChannel(1, 0); OutputAnalogChannel(1, 255); OutputAnalogChannel(1, 0); OutputAnalogChannel(1, 255); OutputAnalogChannel(1, 0); OutputAnalogChannel(1, 255); OutputAnalogChannel(1, 0); }
The measured Output would be

(Peaks are once again exactly 5V and each value is reached after 8ms) Is that correct?

Here are the real results in both cases:

It seems the rise time of the analog output is about 40ms.
This code produces the image below:

int j; for (int i = 0; i<3; i++) { for (j = 0;j < 5;j++) OutputAnalogChannel(1, 0); for (j = 0;j < 5;j++) OutputAnalogChannel(1, 255); }

Thanks for your reply!
What happens if I read an analog channel while doing those loops? Will this affect the speed?
For example

for (int i = 0; i<256; i++) { OutputAnalogChannel(1, i); ReadAnalogChannel(1); }
And is the time to read an analog channel always the same or does it vary by the current which has to be read?

It seems there is no effect to the speed if there is one read function added to this loop.
If there are two read functions, then the execution time is doubled (to 4 seconds).

The execution time of the read function is always same regardless the data value read.

OK thanks.
I tried to use my analog input for the first time (using the demo - to see if it works). But the AD1 and AD2 constantly show 130 when I attach a current.
As source I used a AA battery and the DA output which was set to 255. Both didn’t affect the AD1 and AD2 bar in the demo.
What am I doing wrong?

[quote=“nayjerenko”]OK thanks.
I tried to use my analog input for the first time (using the demo - to see if it works). But the AD1 and AD2 constantly show 130 when I attach a current.
As source I used a AA battery and the DA output which was set to 255. Both didn’t affect the AD1 and AD2 bar in the demo.
What am I doing wrong?[/quote]
Did you remove the jumpers?

No, I didn’t do that. Do I have to?
And if your answer is yes: which ones do I have to remove?

You have to remove SK2 and SK3.
Please see the manual p.12 - 13 for more details:
velleman.eu/downloads/0/illu … k_rev3.pdf