Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Program acts differently after build

Hello!
 
My question is - does the execution of a program using the LV Project Explorer and the program that is built and deployed to the RT target (as a .rtexe) differ significantly? What should be considered when building a stand-alon application?
 
I am using the NI 1742 SmartCam, which has two triggers (ISO In 0 and 1). Trigger0 triggers the acquisition and trigger1 a programmatical counter (adds +1 to a local variable). The acquisition and the counter is triggered in the program with two separate occurrences (untitled.vi attached).
The program works well when I run it in Project Explorer, however, when I built it into a .rtexe everything was working except for the counter, which adds 1 in every cycle (the occurrence does not disarm itself?), not when a trigger signal occurs.
 
It would be appreciated if someone has an idea how to solve this anomaly?
 
Best regards,
Juurma
 
 
0 Kudos
Message 1 of 5
(3,573 Views)
Hi Juurma,

When the source code (VIs) work differently from the rtexe, I typically make a debuggable executable.  I believe this is what you want:
http://zone.ni.com/reference/en-XX/help/370622C-01/lvrthelp/rt_debugging_sta/

Also, it maybe some sort of timing bug.  The debug rtexe should be able to help you in that case.
"If you want to succeed... Architect" - The Specialist
0 Kudos
Message 2 of 5
(3,570 Views)

Hi again,

Well, I konw how to use the debbugging tool, however, it has not helped me too much. I think the problem lies in the occurrence part. First, I thought maybe the loop executes too fast, but after testing several delays in the loop no success.

1) The lower occurrence does not reset itself. Do you know what could be the reason (upper one does reset though)

2) Is there another way to "read" the Iso In channels of NI 1742 smartcamera?

Best regards,

Juurma

0 Kudos
Message 3 of 5
(3,550 Views)
Hello Juurma,

I am not too sure why this is happening in your real-time application. You could try reading the value of the 'Iso In' trigger line using the 'IMAQ Trigger Read2' VI. This VI can be found in Functions >> Vision/Motion >> NI-IMAQ >> Signal I/O. This will allow you to check if the trigger value is being read correctly in the real-time application.

I hope this helps.

Vivek Nath
National Instruments
Applications Engineer
Machine Vision
0 Kudos
Message 4 of 5
(3,524 Views)
Hi Juurma,

Are you saying that a debuggable executable revealed nothing (error, case that did not occur, false data, timing problem ...)?  YOu may want to turn on the wait until debugger launches option to make sure the error does not occur before you log into the EXE.
"If you want to succeed... Architect" - The Specialist
0 Kudos
Message 5 of 5
(3,512 Views)