LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HELP computer crash when using data translation with labview

I don't know exactly how your Datx devices work.  The VI's for them look somewhat similar to the DAQmx VI's that NI provides for their devices.  I'd recommend looking in the example finder for DAQmx examples and model your code after them.

 

You might be able to create the 3 tasks outside of the loop and use whichever of the 3 task wires coming in that you need at the appropriate time.  Your DATx driver may even have a version that allows multiple channels to be configured in a single task, which is what NI's DAQmx examples would do.

 

Did you get the Datx LabVIEW subVI's from the company that makes the device?  You may want to try contacting them.

 

Hopefully someone who has used your DAQ device before is following this thread and can chip in with their advice on how to use that brand.

Message 11 of 13
(425 Views)

I have tried making the three tasks outside of the loop before and referencing them when the time came, it didn't work from what I remember, but I will look into giving that a try again. Unfortunately DO multi-channel is not supported currently from what I can tell.

 

I talked to Data Translation multiple times, but it seems they are stumped. Having tried everything they suggested to no avail, I decided to try the forums.

 

Thank you for all your help!

 

 

0 Kudos
Message 12 of 13
(423 Views)

Luke,  your post hasn't been updated in a while, so I'm hoping you have found a solution by now, but thought I'd offer some advice in case you hadn't.  I sympathize with your troubles with Data Translation.  Their drivers and documentation leave much to be desired.  We've just started using LabView, and had good luck with these boards with our previous program.  Not so much with getting them to work with LabView.

 

I don't have an example handy, but you don't need to write the output as three separate channels  Just add up the total value of all the channels and write that value to the board.  It will determine which outputs are on or off from the total.  Add the values up by using the term (2)^(channel number)

 

Channel 0:  2^0=1 if on, or 0 if off

Channel 1:  2^1=2 if on, or 0 if off

Channel 2:  2^2=4 if on, or 0 if off

Channel 3:  2^3=8 if on, or 0 if off

and so on.

 

So if just channel 1 and 2 are to be turned on, you would send the value of 2+4=6.

 

There are a few good examples in the driver files for basic input/output.  But your're kindof on your own for anything beyond that.  I think the one you need is DtDoutSingle.vi.  Definitely put the open and close subvi's outside of your loop as previously suggested.

 

Hope this helps.

Russ

0 Kudos
Message 13 of 13
(379 Views)