Jump to content
  • 0

Triggering Composite Input on USB-1808X in LabVIEW from Digital Out




I'm trying to use a USB-1808X with LabVIEW to simultaneously output a pair of digital signals on DIO0 & DIO1 (step and direction signals for a stepper driver) while simultaneously acquiring data on 4 analog voltage input channels and a rotary encoder. I can successfully send out the digital signals. Separately and independently, I can simultaneously acquire data on the 4 analog channels and 1 encoder channel. What I am trying to achieve now is to trigger the input acquisition for those 5 channels from the digital output. Specifically, I'm trying to use a third digital port, DIO2, to output a signal that just goes from 0 to 1 to trigger a rising edge trigger.

I have tried using the "Basic Digital Edge" trigger, but I get an error indicating the basic trigger type  is not supported by the task. I'm assuming this means a basic trigger can't be used on a composite input channel. Building on that, I've tried switching to a Composite trigger. If I choose "None", I successfully acquire data but it's obviously not synchronized to anything as it's simply starting as soon as it can. The next option would seem to be the Composite external TTL. However, I cannot find any documentation or examples related to this.

Does this option use the ITRIG port or does it need to be wired somewhere else? Is there a better overall strategy for what I'm trying to achieve?

Any help is greatly appreciated.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @DanCzar.

To trigger composite input channels on the USB-1808X, use the ULx Trigger - Composite Start ExtTTL vi and connect the trigger signal to ITRIG terminal.



In the following (and attached) LV2023 vi example, ULx Cont Acq&Graph Composite-Int Clk_v3.vi, I combined two ULx examples as a quick and dirty demo.

The combined ULx examples are 'ULx Cont Acq&Graph Composite-Int Clk.vi' and 'ULx Write Dig Chan.vi'.  On the USB-1808X, I wired a connection between DIO0 and ITRIG.  Start the example and the top acquisition section should wait until the ITRIG terminal receives a TTL rising edge.  Next, click the 'Data to Write' switch at the bottom to set Do0 high, which will start the acquisition.  You will notice that the Digital Data plot reads the state of Do0, as part of the AuxPort.  Click the 'Data to Write' switch again to change the state of DIO0.  Verify the DIO0 state is low before stopping the example for another run.



USB-1808X User's Guide



Edited by Fausto
LabVIEW 2023 vi example
Link to comment
Share on other sites

  • 0

Thank you @Fausto!

I was able to take what you put together and tweak (capturing finite samples instead of continuous) and it seems to be working correctly now. I think my biggest issue was timing between the two paths, input and output. I setup the two in a sequential frame to make sure the input trigger would be setup and waiting before the digital out fired. I think what was happening was that the digital out would fire before the input trigger was ready so it would get missed and just time out. I've included a screenshot of the relevant block diagram in case it's helpful to anyone in the future.


Link to comment
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
  • Create New...