10-06-2011 12:15 PM
Hi everyone,
I have a VI that contents the following input.
char*stdPortName
DWORD Baundrate
WORD Timeout
bool bRTS
bool bDTR
the output is true or false.
I do not know how I implement it in labview, because how I will go to put a bool variable in the input.
10-06-2011 12:39 PM
A bool variable is a boolean control/constant/indicator in LabVIEW, depending on whether u want an input, constant, or output.
Are you having trouble finding these? Or have I misunderstood your problem?
10-06-2011 12:47 PM - edited 10-06-2011 12:47 PM
A VI would not have those inputs. Those datatypes indicate (most likely) a Windows API function call. Are you talking about calling a DLL? If so, bool is equivalent to an integer, so on the LabVIEW side you can use an INT32.
If that's not what you are talking about, then please provide more details to explain your problem better.
10-06-2011 01:13 PM - edited 10-06-2011 01:17 PM
@smercurio_fc wrote:
A VI would not have those inputs. Those datatypes indicate (most likely) a Windows API function call. Are you talking about calling a DLL? If so, bool is equivalent to an integer, so on the LabVIEW side you can use an INT32.
Windows API sometimes returns a BOOL which is a 32 bit int. However, typically an input would actually be of type bool, not BOOL. This looks like it's a bool, especially since the variable starts with b which indicates bool. A bool is a 8 bit unsigned char.
Matt
@Pereira, by the way, you can use the bool to (1,0) vi to convert from labview bool to the dll unsigned char so that you can feed it into the call library function node.
10-06-2011 01:23 PM
Well, the Windows API doesn't have "bool". It has "BOOL" (which is an int), so I took that as the user entering it wrong. "bool" is a Visual C/C++ datatype, which, as you correctly indicated, is a 1 byte datatype.
Still don't understand what the user is trying to do.
10-06-2011 02:45 PM
Yeah, you're right about the win API not having bool, only BOOL.