I have a PXIe-1071 chassis with PXIe-8840 embedded controller (Win 7 OS) and PXIe-4138. I use the PXIe-4138 to send a periodic external signal and I need to syncronize a camera acquisition with the PXIe-4138 signal. The camera is a USBcamera that I want to control through an hardware trigger.I think it is a quite standard procedure with labview, but I didn't find a proper example, and I am quite new to Labview.
You will be using the SMB Connector on PXI(e) Controller to Route Trigger Signals to the USB camera.
To do this you will have to wire "/<hostname>/TRIG_SMB" (update with your hostname) to the Export Signal API as shown below.
Thank you! I did as you suggest and it works.
My problem now is that the SMB output is systematically 5V. Once I send the output from the PXIe-4138, the trigger switch to 0.5V and then goes back to 5V once the PXIe-4138 sequence is finished.
What I need would be the opposite: a 0V output from the smb untill the signal starts, and then a 5V impulse (of limited duration) when the signal starts.
do you have any idea how to implement this?
I could not find a polarity configuration for StartTrigger export, rather you can use SourceCompleteEvent (generated after source delay) and configure the polarity and width.
Note: As per my understanding, the SMB port is routed to the PXI trig line only as long as the configured session is active, this means that as soon as you close the DCPower session, the route is cleared and maybe there is a default Pull-Up on SMB port. I would recommend you probe both SMB and SMU outputs on oscilloscope channels to understand and tune the relationship.
I tried your suggestion, but actually in this way I can only change the polarity of the signal once the SMU is committed, and nothing changes before: output always at 5V, which is a problem for the camera. Moreover, with that command I can only change polarity and width of the trigger signal, but not the amplitude. Is it not possible at all to act on the SMB output settings indipendently from the SMU state?
This is a problem to me also because apparently the output is in current and not in tension: if I connect the SMB output to the I/O port of the camera, the signal lowers to 3.5V and is not enough to trigger the camera acquisition (I need at least 5V).
After several tests with different loads, I found out that the SMB output is either 0.5 V (when it is off) or 5mA (when it is on). I need a way to control and change the values of these 2 conditions.
I also have another problem related to the trigger signal. What I finally need is to iterate a sinusoidal signal with the SMU and trigger the camera acquisition at every period.
In my .vi I set a single-period sequence with "niDCPower Set Sequence.vi" by imposing the sinusoidal frequency and amplitude and by imposing a SMU sample rate (I attach the .vi) at which the SMU output value changes, much higher than the sinusoidal frequency. Than I make a loop to stop the SMU after the desired number of iterations. The .vi works properly for generating the desired signal, but it has problems with the trigger: If I set "StartTrigger" as signal of "niDCPower export signal.vi" I only recover a trigger at the beginning of the signal. "SourceCompleteEvent" appears to be more suitable, but instead of sending a trigger after every period, it sends a trigger after every step of the sequence. In other words, it sends a trigger at the same rate of the SMU sample rate, when the SMU output value changes. I tried all the possible signals I can set in "niDCPower export signal.vi" but what I obtain is always either no triggers, a single trigger at the first iteration or a trigger at the SMU samle rate. How can I instead obtain one single trigger for each iteration?
Unfortunately, I could not find much documentation about the SMB port itself and I would assume that the port is default pulled up to 5V. In my opinion, the SMB port will not have much flexibility and alternatively, you could add a 6674T to do all these level translation stuff.
How about the "Sequence Iteration Complete", if you create a single cycle sinewave as a sequence and iterate it multiple times, you may be able to get away with this event.
If I try with "Sequence Iteration Complete" I do not recover any trigger at all: when the SMU passes to the committed state, the voltage falls down from 5V to 0.5 V and then returns at 5V when the last iteration is finished.
The event should definitely be generated, you might want to verify if you configured it correctly and are looking at the right instance.