08-01-2023 09:37 AM
Hi everyone, I have been looking through the forum trying to find a solution to my problem but I haven't been able to find what I'm looking for so I finally decided to reach out myself and ask members of this community for help. The hardware I'm using is NI PCIe 6343 and BNC 2110.
For recap, I'm working on this project with someone else and they have already left now so I'm taking care of the rest, but I'm stuck. Our project revolves around generating a square wave for 4 channels that are connected to the daq board and using one of those waves to trigger a camera to take pictures and save information to an excel sheet and the three other waves to trigger three LEDs to turn on and off. The other person working on this project already completed generating the signals and sending those to 4 analog output channels on the BNC and I have also made progress with connecting a vision acquisition express vi to the gige camera that we have and saving key information to an excel sheet and saving pictures to our computer.
The problem now lies in the fact that I'm lost on how to connect the two together. Ideally, since channel 1 is the one the camera is connected to, the generated square wave should activate the vision acquisition express vi whenever there is a peak. However, this doesn't work and the camera only activates once in each iteration of the while loop. I know I can edit the vision acquisition express vi to include a trigger source, but I'm unsure of how to utilize this and I even connected the waveform from channel 1 but it didn't work. I read from someone else's post that the timing should be governed by the trigger but I'm not sure of how this would work either. This is the link to that post ("https://forums.ni.com/t5/LabVIEW/Trigger-the-loop-with-a-square-wave/td-p/2437598?lang=en"). I would appreciate any help from anyone as I'm not sure how to proceed.
I also want to figure out later how to trigger the FIP_ImageSave vi whenever a peak is detected as well, but for now my main focus is on triggering the vision acquisition express vi with the square wave that is being generated and sent to the daq board.
PS: I would say I'm still fairly new to labview so I apologize in advance with how unoptimized the camera portion is in the labview vi I attached. I know I also still need to figure out where to place imaq dispose but for now I'm thankful it works.