LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

defining DWORD in uir

Hi,
   I have a ring slide in .uir with constant name RATE. It has been initialised to int. i m trying to pass its value in my source code using
GetCtrlVal (panelHandle, PANEL_RATE, &BAUD_RATE);
 
BAUD_RATE has been declared as DWORD in my source file.
On debugging it gives me an error
 
  Type error in argument 5 to `birdRS232WakeUp'; found 'pointer to DWORD' expected 'DWORD'.
 
I guess this is because RATE has been defined as int in the uir. I have tried a few combinations but it does not work. I need to keep BAUD_RATE as DWORD.What do i define RATE as?
 
Can u help me with this
 
Thanks in advance
Kunal Chaniary

 
0 Kudos
Message 1 of 4
(3,645 Views)

Another duplicated post... Sorry

Message Edited by Roberto Bozzolo on 04-11-2006 11:28 AM



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 2 of 4
(3,638 Views)

Duplicated post. 

Message Edited by Roberto Bozzolo on 04-11-2006 11:28 AM



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 3 of 4
(3,638 Views)

DWORD is a type that is equivalente to an unsigned long (as defined into CVIDEF.H include file), so it has the same lenght as INT type. You can define your rinh value as unsigned int instead of int and you can represent a DWORD value in it and pass back its value to a DWORD variable. To go to the definition of a type you can right-click on the type itself and select "Go to tefinition" option (or press Ctrl+I which is equivalent), this provided your project has been succesfully compiled and linked, otherwise you will get a "no definition error".

The problem you are finding is not related to retrieving the ring value but to how you have defined a parameter in 'birdRS232WakeUp' function and how you are calling it: it seems that your function parameter is defined as DWORD and you are actually calling this function passing a pointer to a a DWORD variable instead of the variable itself.

Message Edited by Roberto Bozzolo on 04-11-2006 11:27 AM



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 4 of 4
(3,638 Views)