LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple usb-6289 boards and one task

Solved!
Go to solution

Hi Folks!

 

I am using two usb-6289 cards and i want to write 64 samples (one per channel).

 

Since each card only has 32 digital I/O plus 16 PFI lines, I need an adicionnal 16 digital I/O lines in the second

USB-6289.

 

When I try to send the data, I get an error saying that "multiple cards are not supported in one task".....

 

How do I get around this problem?

 

I am also trying to read data from 16 analog input lines in the first USB-6289 card.

 

 

P.S.: the data I am trying to send are the Adress Bits for 16 multiplexers ADG-406 

 

Any help would be apreciated!

 

Cheers! 

0 Kudos
Message 1 of 12
(4,071 Views)

Anyone?

 

Could use the helpSmiley Happy

 

Cheers 

0 Kudos
Message 2 of 12
(4,062 Views)

Create a separate task for each of the boards and run the two tasks simultaneously.  You aren't going to be able to create a single task for two different boards, no matter how hard you try.

 

Your analog input will also need to be a separate task.

0 Kudos
Message 3 of 12
(4,058 Views)

Ok. I understand....

 

But how am I going to send the 64 bits of data in sync using both boards?

 

Is there a way to sync the boards?

 

And also, I need the adress bits for each multiplexer to change, until all 16 gates have been open, each at a time (loop the adress bits for each multiplexer because I am trying to use the system to do a scan).

 

Any thoughts?

 

Cheers! 

0 Kudos
Message 4 of 12
(4,044 Views)

I suspect that you will not be able to truly synchronize two separate USB devices.  Even if they are on separate USB buses in the computer, the OS likely will only write to one at a time.  Can you generate a trigger or enable pulse on an additional line?  Set all the address lines to the desired values, asynchronously, and then use the enable pulse to activate all at once.  You might need to add some address latches in your external circuits to accomplish this.

 

Lynn 

0 Kudos
Message 5 of 12
(4,035 Views)

I haven't used the 6289 much, but you should be able to set up a counter task and use that as the clock source for both boards. 

 

See attached VI.  This will probably get you close.  You'll need to rearrange your digital signals a little bit, so that you can have PFI0 available as a clock source on both boards -- so use channels 0-31 on each board for your 64 outputs.

 

It's a little complex, so read the comments on the block diagram carefully so that you understand what's going on.  Apologies for the slightly messy block diagram, but it should be readable.  Then try it out and post back if you run into problems.

 

Hope this helps,

Diane

0 Kudos
Message 6 of 12
(4,024 Views)

I am using LabVIEW 8.5, could you upload again to 8.5?

 

Thanks.

 

Cheers!

0 Kudos
Message 7 of 12
(4,012 Views)
Solution
Accepted by topic author Rsilva
Here you go.
0 Kudos
Message 8 of 12
(4,007 Views)

Thank You DianeS.

 

That's was exactly what I needed. With a few modifications I can adapt to my system.

I have also been looking through some of the tutorials about M series Sync (I recalled seing something on those

previously).

 

Again, thank you for the file and the tutorial in it!

 

Cheers!

 

 

0 Kudos
Message 9 of 12
(3,967 Views)

Glad to be of help!

 

I note that you marked your own post as the solution, though.  🙂  Not that it's that big of a deal, but if you think of it or are so inclined, you might want to change the "solution" post to the one I authored with the VIs attached.

 

Good luck and post back if you need more help.

 

ds

0 Kudos
Message 10 of 12
(3,956 Views)