Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2167

Problem with PCI-NI 6229, delay one channel respect to the other and synchronize with an external clock.

$
0
0

Hi everyone,

 

I want to control two acusto-optic deflectors (AOD)  in order to move a laser beam into a plane. I am using a PCI NI 6229 and two SCB-68 M series boxes:

 

- Each acusto-optic deflector deflects de laser beam in one axis, reason for which I use two deflectors, one for the X channel and the other for the Y channel.

 

- The RF generator receives a digital order, 8 bits are controlling the amplitude, 15 bits are controlling the frequency (the position of the laser beam) and one additional bit is set always at 1.

 

Then, since the PCI NI 6229 has 3 ports with 32, 8 and 8 bits respectively, I use the 32 bits port for controlling the position and the two 8-bit ports to control the amplitude.

 

-port0/lines0:29 --> modulation of the position --> 0:14 (X channel) and 15:29 (Y channel)
-port0/lines30:31 --> bits of control, always at 1.

-port1 --> aplitude of X channel

-port2 --> amplitude of Y channel.

 

Then, what I want to do is to move the laser beam using a harware clock of the same PCI at 100 KHz. But I want to separate the channel X from the channel Y in order to put a delay in time in one channel, because they are not synchronized, for physical reasons...

 

The problem I have occurs when I change the 30 bits array (with the information of the X and Y position) to 2 arrays of 15 bits USING the same clock...

 

The error I have is the following... "The specified resource is reserved. The operation could not be completed as specified".

 

I think that this error comes from the impossibility of writting the same port twice at the same time... because the task is acting on the whole port, not in the individual channels. 

 

Could anyone help me? The other possibility is to do the following, in the same task, with the external clock:

 

1. open X channel

2. write X channel
3. close X channel
4. open Y channel
5.write Y channel

6. close Y channel

 

But I don't know how to do it...

 

Thanks!

 

 

 

 


Viewing all articles
Browse latest Browse all 2167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>