‎04-24-2004 12:01 PM
‎04-27-2004 09:34 AM
‎05-10-2004 12:42 PM
‎03-26-2008 04:21 AM
The vcserial.zip file at the given address was very useful. I was able to configure the serial device and also i was able to write the command in text(edit) box and subsequently i was able to read the data using the read command button.
But i want to modify the program so that inspite of taking the command from text box it should take from variable or directly . Also we are not able to understand the variable defined vText of COleVariant datatype. I have sent the code how we want to implement.
The statements to write to serial port is as follows:
//Clicking the Write Button causes the Send String to be written to the device
COleVariant vText;
UpdateData(TRUE);
vText= m_writeText;
m_cwSerial.Write(vText);
we are writing "#02M\13" command in the text box and send the data to serial port by pressing write command button and subsequently pressing read command button to get back the response. It is working fine.
What we want:
Inspite of taking data from edit box the command "#02M\13" it should be directly write the command "#02M\13" by storing in the variable or by any other means.
What we tried:
//Clicking the Write Button causes the Send String to be written to the device
COleVariant vText;
COleVariant temp;
// UpdateData(TRUE);
//vText=m_writeText;
temp = "#02M\13";
m_cwSerial.Write(temp);
it writes to the device but read command gives.
‎03-26-2008 05:32 PM
temp = "#02M\\13"; //Note the double backslashes.
‎04-02-2008 06:15 AM
Thanks for the suggetion. The program is working fine