Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

3 LJTDAC with DAQFactory

ljtick-dac

  • Please log in to reply
4 replies to this topic

#1 Ledl

Ledl
  • Members
  • 4 posts

Posted 13 May 2015 - 03:03 AM

I have 3 ljtick modules connected to the same LabJack U3 device. Using the LJTDAC_Dual.ctl example on http://labjack.com/s...ples/daqfactory, I can control 2 of them via channels DACA/B_1 and DACA/B_2 of the "test" device. It however looks like there is no DACA/B_3 channel available. Just adding these channels to the channels list, and adding ljtdac3PinNum=... to the StartUp sequence did not work.

 

I can however control all three ljtick modules using the following code (without using the channels):

 

// Select channel 8, and then set the speeds of DACA and DACB
ePut(ID, LJ_ioPUT_CONFIG, LJ_chTDAC_SCL_PIN_NUM, 8, 0)
ePut(ID, LJ_ioTDAC_COMMUNICATION, LJ_chTDAC_UPDATE_DACA, 1.5, 0)
ePut(ID, LJ_ioTDAC_COMMUNICATION, LJ_chTDAC_UPDATE_DACB, 2.5, 0)
 
// Select channel 10, and then set the speeds of DACA and DACB
ePut(ID, LJ_ioPUT_CONFIG, LJ_chTDAC_SCL_PIN_NUM, 10, 0)
ePut(ID, LJ_ioTDAC_COMMUNICATION, LJ_chTDAC_UPDATE_DACA, 1.5, 0)
ePut(ID, LJ_ioTDAC_COMMUNICATION, LJ_chTDAC_UPDATE_DACB, 2.5, 0)
 
// Select channel 12, and then set the speeds of DACA and DACB
ePut(ID, LJ_ioPUT_CONFIG, LJ_chTDAC_SCL_PIN_NUM, 12, 0)
ePut(ID, LJ_ioTDAC_COMMUNICATION, LJ_chTDAC_UPDATE_DACA, 1.5, 0)
ePut(ID, LJ_ioTDAC_COMMUNICATION, LJ_chTDAC_UPDATE_DACB, 2.5, 0)
 
Is there a way to add a third channel to the "test" device?


#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 13 May 2015 - 10:21 AM

Look at the comments on Page_0.  Sounds like what you are missing is:

 

The variable value component (VVC) displays on this page, for each LJTick-DAC channel, are used to update the values of test channels.  Then code to actually command the LJTick-DACs is put in the event for each test channel.  A channel's event code is executed whenever the channel is updated, so the update via the VVC causes the test channel's event code to execute.

 

Test channels are not connected to any hardware.  To make them do something with hardware, we use script in each Channel's Event area.



#3 Ledl

Ledl
  • Members
  • 4 posts

Posted 18 May 2015 - 01:46 AM

OK, I understand that. But, what I would like to know is actually the following: To run my 3 LJTick-DACs, I took the LJTDAC_Dual.ctl example from the website and added a third PinNum line:
 
global ljtdac1PinNum = 8
global ljtdac2PinNum = 10
global ljtdac3PinNum = 12
 
Then, I created two new channels DACA_3 and DACB_3 in the channels table.
 
Unfortunately it doesn't seem to work. I'm only able to address channels DACA_1,DACB_1, DACA_2 and DACB_2, but not DACA_3 and DACB_3. Is there a way to solve this problem and add two more LjTick-DAC channels (DACA_3 and DACB_3) to the channels list?  


#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 18 May 2015 - 06:55 AM

Did you put the proper script in the Event are for each of those new channels?  Look at the Event code in the working channels.



#5 Ledl

Ledl
  • Members
  • 4 posts

Posted 18 May 2015 - 07:57 AM

Oups, it's indeed the Event code I forgot to change.

 

Thanks for your help.





Also tagged with one or more of these keywords: ljtick-dac

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users