LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Generate 2 AO with different buffers

Hi all ,

 

I'm using the NI 6536 ,

 

i want to make 2 analog output's using 2 diffrent buffers , in order to do so i made 2 tasks one for each AO

 

when i'm trying to use the 2'nd WriteAnalogF64 i'm getting an error.

 

Is there any example for using the 2 AO in the same time with 2 diffrent Buffers ?

 

Thank you , 

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 1 of 4
(3,099 Views)

Solved 🙂

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 2 of 4
(3,088 Views)

Hi Kobi,

 

we are all happy that you succeeded! Smiley Happy However, right now this thread does not provide much benefit for others - maybe you find the time to also post your solution? It might assist others facing similar problems...

0 Kudos
Message 3 of 4
(3,085 Views)

You are right , I'm sorry a bit pressure at work.

 

The AO generation that I needed to do is simply 2 AO with 2 different buffer.

 

Since we are creating 1 task and 2 AO channels to this task we need to decide 1 of 2 ways to implement it with our data layout in the WriteAnalogF64 function

 

1. The option of Group by channel

2. The option if group by scan number

 

this option will decide for out instrument how to arrange the buffer before the AO

 my option is by channel lets say we need to output 10000 points , in order to create 2 AO buffers we will malloc 10000*2 channels*float64

Now points 0 - 9999 are for AO0 and points 10000 - 19999 are for AO1

by setting our rate we can calculate the time difference between 2 array cells and by doing so we can simply create any wave we want

 

Hope it will help , if any one want some assistant with AO & AI problems you can send me msg and I will try to help 🙂

 

I will try to create at home some good example and I'll upload it

 

Good day.

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 4 of 4
(3,082 Views)