tryerson Posted January 21, 2020 Share Posted January 21, 2020 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 Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted January 22, 2020 Share Posted January 22, 2020 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. Quote Link to comment Share on other sites More sharing options...
tryerson Posted January 22, 2020 Author Share Posted January 22, 2020 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. Quote Link to comment Share on other sites More sharing options...
AzeoTech Posted January 22, 2020 Share Posted January 22, 2020 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. Quote Link to comment Share on other sites More sharing options...
LabJackSupport Posted January 22, 2020 Share Posted January 22, 2020 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.