tryerson

addressing LJ-TickDACs on a T7 Labjack

Recommended Posts

I am missing a key step in setting DAC outputs using two LJTick-DACs on a T7 Labjack.  I have a sequence that executes the following code (copied from https://labjack.com/support/datasheets/accessories/ljtick-dac)

err = LJM_eWriteName(handle, "TDAC0", 1.0)

err = LJM_eWriteName(handle, "TDAC1", 2.0)

err = LJM_eWriteName(handle, "TDAC2", 3.0)

which is intended to set DACA to 1 volt and DACB to 2 volts for a LJTick-DAC connected to the FIO0/FIO1 terminal block of a T7 Labjack, and set DACA to 3 volts for a second LJTick-DAC connected to the FIO2/FIO3 terminal block on the same T7.

What am I missing?

Thanks in advance - much obliged

Share this post


Link to post
Share on other sites

With the T7, you should just be able to create a channel with the TDAC I/O type, the desired TDAC # in Channel # (i.e. 1 for TDAC1), and treat it like any other analog output channel in DAQFactory (i.e. Timing = 0).

Note that when scripting for the T7 (or UD devices for that matter), DAQFactory takes care of the Handle.  You always specify the id instead.  

Share this post


Link to post
Share on other sites

Thanks, that was easy!  Can you tell me where that's spelled out in the help files or online?  I feel like I'm overlooking something somewhere.

Share this post


Link to post
Share on other sites

It is in 17.9 of the DAQFactory User's Guide, but basically the T series stuff has a name for just about every parameter and in DAQFactory you can specify the name and the value in channels, so you don't really have to use script (though you can).  The common names are actual I/O types, while uncommon ones can be accessed using the "Special" I/O type and the Quick Note column.  

Share this post


Link to post
Share on other sites

Our DAQFactory for LJM page is chock full of nuggets so I would go through it thouroughly, and take a good look at the LJM_Basic.ctl example that demonstrates many key things.

Per AzeoTech's point about using a DF Channel you can find info here:

http://labjack.com/support/software/examples/ljm/daqfactory#LinkingChannels

Per AzeoTech's point about DF taking care of Handle, the following hints at that:

http://labjack.com/support/software/examples/ljm/daqfactory#Opening

... and then does not seem to be clearly stated, but you can see the example script is passing an LJM identifier as the first parameter:

http://labjack.com/support/software/examples/ljm/daqfactory#Script

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now