Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

NI PCIe-6321, PCIe-1433 - RTSI connected use

I've set up the trigger. However, the picture does not come out properly.

Is there another source coding method? (C++)

 

1.PNG

Image marked as vtk (500x1024)

0 Kudos
Message 1 of 14
(4,403 Views)

Configuration has already been finished?

Real-Time System Integration (RTSI) and Configuration Explained

 

I guess timeout error broke out. How are you configuring terminal between PCIe-6321 and PCIe-1433?

Which is master device, what signal are you sharing?

 

For example as below.

PCIe-6321 (PFI1) -->  start trigger --> PCIe-1433(TRIG)

In above case, 1433 should be waiting start trigger before 6321 sends the signal.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 2 of 14
(4,392 Views)

Four configurations have been completed.

 

DAQmxErrChk(DAQmxCreateTask("AOCh0", &m_BScanOutTask));
DAQmxErrChk(DAQmxCreateTask("AOCh1", &m_CScanOutTask));
DAQmxErrChk(DAQmxCreateTask("C0CH", &m_CAMTimmingTask));
DAQmxErrChk(DAQmxCreateTask("C1CH", &m_MasterTrigTask));

 

DAQmxErrChk(DAQmxCreateCOPulseChanFreq(m_MasterTrigTask, "Dev1/ctr0", "", DAQmx_Val_Hz, DAQmx_Val_Low, 0.0, CounterFrequency, 0.8));
DAQmxErrChk(DAQmxCfgImplicitTiming(m_MasterTrigTask, DAQmx_Val_ContSamps, XRange));
DAQmxErrChk(DAQmxSetStartTrigRetriggerable(m_MasterTrigTask, TRUE));

DAQmxErrChk(DAQmxCreateCOPulseChanFreq(m_CAMTimmingTask, "Dev1/ctr1", "", DAQmx_Val_Hz, DAQmx_Val_Low, 0.0, CounterFrequency, 0.2));
DAQmxErrChk(DAQmxCfgImplicitTiming(m_CAMTimmingTask, DAQmx_Val_FiniteSamps, XRange));
DAQmxErrChk(DAQmxSetStartTrigRetriggerable(m_CAMTimmingTask, TRUE));
DAQmxErrChk(DAQmxConnectTerms("/Dev1/Ctr1InternalOutput", "/Dev1/RTSI0", DAQmx_Val_DoNotInvertPolarity));
DAQmxErrChk(DAQmxCfgDigEdgeStartTrig(m_CAMTimmingTask, "/Dev1/Ctr0InternalOutput", DAQmx_Val_Rising));

DAQmxErrChk(DAQmxCreateAOVoltageChan(m_BScanOutTask, "Dev1/ao0", "", -10.0, 10.0, DAQmx_Val_Volts, NULL));
DAQmxErrChk(DAQmxWriteAnalogScalarF64(m_BScanOutTask, 1, 10.0, GarvoBMInitBuffer, NULL)); //x axis mirror initial position shift

DAQmxErrChk(DAQmxCreateAOVoltageChan(m_CScanOutTask, "Dev1/ao1", "", -10.0, 10.0, DAQmx_Val_Volts, NULL));
DAQmxErrChk(DAQmxWriteAnalogScalarF64(m_CScanOutTask, 1, 10.0, GarvoCMInitBuffer, NULL)); // y axis mirror initial position shift

 

DAQmxErrChk(DAQmxCfgSampClkTiming(m_BScanOutTask, "", CounterFrequency, DAQmx_Val_Rising, DAQmx_Val_FiniteSamps, XRange));
DAQmxErrChk(DAQmxSetStartTrigRetriggerable(m_BScanOutTask, TRUE));
DAQmxErrChk(DAQmxCfgDigEdgeStartTrig(m_BScanOutTask, "/Dev1/Ctr0InternalOutput", DAQmx_Val_Rising));
DAQmxErrChk(DAQmxWriteAnalogF64(m_BScanOutTask, XRange, 0, 10.0, DAQmx_Val_GroupByChannel, GarvoObuffer, NULL, NULL));

 

Trigger is configured like this.

 

 

0 Kudos
Message 3 of 14
(4,386 Views)

It seems that there is no critical problem.

The device export counter signal by "DAQmxConnectTerms" function.

 

If your code is no problem, execution order might cause a problem.

Before starting counter task, has PCIe-1433 been waiting state?

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 4 of 14
(4,340 Views)

How can I tell if the 1433 is on standby? I'm not sure because it's my first time.

 

The video came out, but I just decided that the trigger was wrong because it was not the desired video.

In addition, some changes were made to the Camera option in NI-MAX.

 

e2OCT_setting1.PNGe2OCT_setting2.PNG

 


ex) The image is output as vtk after cuda cuffing.

0 Kudos
Message 5 of 14
(4,329 Views)

Press "Snap" button on NI MAX. Image doesn't show up yet.

After you start DAQmx program, image should be shown up, right?

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 6 of 14
(4,318 Views)

Thank you for answer.

 

If the test does not trigger the DAQ program, NI-MAX generates a time out.

1.PNG

 

However, when I trigger on a DAQ program, no time out error occurs in NI-MAX, but the image does not appear and is displayed in black and white.

2.PNG

0 Kudos
Message 7 of 14
(4,315 Views)

In addition, the camera settings are set to Internal as shown in the image below.

3.PNG

0 Kudos
Message 8 of 14
(4,299 Views)

No timeout error implies that trigger detection on PCIe-1433 is success.

Let's move our sight to why camera doesn't return expected image.

 

When you configure the camera with no trigger, does it return expected image?

If so, this problem is caused by trigger configuration.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 9 of 14
(4,283 Views)

Thank you for answer.

 

Without the trigger, the desired image will not come out.
6321, 1433 Is there a command to sync two?

 

 

0 Kudos
Message 10 of 14
(4,280 Views)