You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
4.4. GENERAL ASPECTS OF CODE GENERATION 91<br />
Looking at the mentioned points we recommend to do the programming according to the following<br />
rules:<br />
1. Don’t modify the loop variable or the step value inside the loop. If you need this behavior<br />
use the ÛÐ-loop.<br />
2. Don’t use the loop variable after the loop.<br />
4.4.3 System Parameters<br />
You should know that <strong>HDevelop</strong> performs some changes of system parameters of HALCON<br />
by calling the operator ×Ø ×Ý×ØÑ (see reference manual). This might cause the exported<br />
program not to produce identical output. If such a problem arises, you may query the system<br />
parameters by means of Ø ×Ý×ØÑ in <strong>HDevelop</strong> after or while running the original <strong>HDevelop</strong><br />
version of the program. Depending to the problem, you can now modify relevant parameters by<br />
explicitly calling the operator ×Ø ×Ý×ØÑ in the exported program.<br />
4.4.4 Graphics Windows<br />
The graphics windows of <strong>HDevelop</strong> and the basic windows of the HALCON libraries (C++:<br />
class ÀÏÒÓÛ, Visual Basic: class ÀÏÒÓÛØÖÐ, C: addressed via handles) have different<br />
functionality.<br />
¯ Multiple windows<br />
If you use the operator Ú ÓÔÒ ÛÒÓÛ to open multiple graphics windows in <strong>HDevelop</strong>,<br />
these calls will be converted into corresponding calls of ÓÔÒ ÛÒÓÛ only for<br />
C++ and C programs. In the export of Visual Basic programs, all window operations are<br />
suppressed, because the exported code is intended to work together with the Visual Basic<br />
template. If you want to use more than one window in Visual Basic, you have to modify<br />
the code and project manually.<br />
Note, that the export of programs containing multiple windows to C++ or C might be<br />
incorrect if the ØÚØ-button was used during program execution.<br />
¯ Window size<br />
In exported Visual Basic programs, the size of the window in the panel is predefined<br />
(½¾ ¢ ½¾) thus it will normally not fit to your image size. Therefore, you must adapt the<br />
size interactively or by using the properties of the window.<br />
¯ Displaying results<br />
Normally, the result of every operator is displayed in the graphics window of <strong>HDevelop</strong>.<br />
This is not the case when using an exported program. It behaves like the <strong>HDevelop</strong> program<br />
running with the options: “update window = off”. We recommend to insert the<br />
operator Ú ×ÔÐÝ in the <strong>HDevelop</strong> program at each point where you want to display<br />
data. This will not change the behavior of the <strong>HDevelop</strong> program but result in the<br />
appropriate call (×Ô Ñ, ×Ô ÖÓÒ, etc.) in the exported code.<br />
When generating code for C++, close the default graphics window (using<br />
Ú ÐÓ× ÛÒÓÛ) and open a new one (using Ú ÓÔÒ ÛÒÓÛ) before the first call of<br />
Ú ×ÔÐÝ in order to assure a correct export.<br />
HALCON 6.0