LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Labwindows UIR

Solved!
Go to solution

Ok really really thanks I will try and I will update you.

 

 

0 Kudos
Message 11 of 18
(1,333 Views)

Hi ,guybrush_threepwood 

 

I did that according to the following page which in the NI Help manual :

 

Building a Project in an External Compiler

360截图20210929142204045.png

 

and I also make some small changes in my project in VS2015,such as renaming the .c file to .cpp file (After renaming it will run successfully).

 

My project in CVI is a small , simple project for testing integrating , it only has a button and a LED on the panel with a simple "switch on LED" function in code.       So maybe it will be a bit more hard to deal with if the project is big and complicated.

0 Kudos
Message 12 of 18
(1,323 Views)

And by now ,I can successfully manipulate the labwindows/CVI panel by clicking the Qt widget panel . This means it's realizable to decorate the Labwindows project to many style freely  .

  ( In my simple project I can click the Qt panel 's button to control the CVI panel 's LED. )

    I am still trying on merging the CVI panel and the Qt panel together ,and leaving just ONE icon on the desktop's taskbar .

  

 

0 Kudos
Message 13 of 18
(1,293 Views)

HI!

On the CVI platform, Use SQL condition range query (DBActivatesql (hdbc, "select * from testdata where testdate between '" + StartDate + "'and'" + enddate + "');) In the process, Why can't you extract the conditional string in the conditional string variable?. If the query condition is changed to a string constant, the previous closing record can be obtained normally.

0 Kudos
Message 14 of 18
(994 Views)

What has this post to do with the argument of this discussion?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 15 of 18
(985 Views)

Hello Roberto,

 

Your suggestion has been on my mind for a long time.

But I haven't dared ask you.

It's a very cool and great display.

Perhaps you have a working example?

 

Pims_0-1744620342618.png

 

Thanks.

Patrick

 


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
0 Kudos
Message 16 of 18
(80 Views)

Hello Patrick, there's no magic in that, just a little bit of creativity! And I can share it with you.

 

I have basically leveraged the transparent color to tailor the numerics and used two different indicators for integer and fractional digits with a custom function to write values to them.

 

Using transparent color can be tricky in case your panels have the Use Windows Visual Styles for Controls attribute enabled, since you cannot paint the frame in transparent on them. In this case I use a dummy panel without that attribute set and customize controls according to my needs. Customized controls can next be cut and pasted on the destination panel maintaining the transparency you set in the dummy panel. 😉

 

The two-dimensions indicator is basically built with two separate indicators put side-by-side:

  • Indicator for integer portion: use a double with 0 precision, right-aligned
  • Indicator for fractional part: use a double with 0 precision and padding equal to the number of decimal digits you need, left-aligned

Writing to this indicator is performed via this function:

/// HIFN ComplexInd ()
/// HIFN Show a value on a complex indicator (actually two
/// HIFN separate indicators for integer and fractional part)
/// HIPAR panel/Handle of the panel that hosts indicators
/// HIPAR ctlInt/Indicator used for integer part of the measure
/// HIPAR ctlDec/Indicator for fractional part
/// HIPAR val/Value to show
/// HIPAR nDec/Precision (number of decimals)
void CVIFUNC ComplexInd (int panel, int ctlInt, int ctlDec, double val, int nDec)
{
	double	intg, frac, scale = pow (10, nDec);

	// Split integer and fractional parts
	frac = modf (val, &intg); frac *= scale;
	if (frac < 1.0e-4) frac = 0.0;	// Avoid showing too small numbers

	// Avoid showing (1+100 hundreds)
	if (frac > scale - 1.0) { intg += 1.0; frac = 0.0; }

	// Show values
	SetCtrlAttribute (panel, ctlInt, ATTR_CTRL_VAL, intg);
	SetCtrlAttribute (panel, ctlDec, ATTR_CTRL_VAL, frac);

	return;
}

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 17 of 18
(68 Views)

 

Hello Roberto,

 

Thank you very much.
You're always so helpful.
I suspected the solution, but I wanted to be sure.

The visual is so awesome 😎

 

Patrick.


Certified LabWindows/CVI DEVELOPER (2004)
LabVIEW since 5.01 | LabWindows/CVI since 4.01
0 Kudos
Message 18 of 18
(59 Views)