yes. how?
Type: Posts; User: Marvin Gorres
yes. how?
Hye guys, below is my code, i dont know why i cant get the actual result into txtTest.text, in debug mode, i did see the result that i want in list[1], without convert to string there will be an...
hi, i have a windows application form which will be filled with some data, i need to export those data to a crystal report (without going through the database and without opening the crystal report)...
Hello guys, i'm kinda new to c#, i wanna create a program which will take few data from GUI and export it into an excel file. Another thing is how to modify the data displacement in that particular...
im using CSTOPB, it says that it send two stop bits. how to send one stop bits.
I don't really know how to use it and the hardware user manual doesn't mention anything about it. I did thought of using it but no sure how.
I've check the return value from read many times and it does return the correct number of bytes returned. The problem is the content of the returned value. sometimes i et the correct value and...
No but the baudrate i used is specified in the hardware user manual.
Done. Thanks Kurt, but the problem is still the same.
Hello guys, i have a code which used to connect my hardware through the USB port. Sending data in HEX format and when the hardware reply or gives out an output, it will direct go to a .txt file.
...
even if i changed to this code
result2 = write(mainfd, myCommand, sizeof(myCommand)); //return number of byte written to the port
if ( result2 < 0 ) { perror("error: write"); }
if...
Hello Zuk, i changed it already. Thanks for the information, now my error looks like this:
error: write: Success
error in write, result = -45
but i just disable the second error and i get the...
its negative.
Yea you got a point there. Any suggestion how to check the error?
Now i'm trying to transfer 211 byte of data so i have this code below:
unsigned char myCommand[211] = { 245,65,0,196,0,0,133,245,245,0,1,1,245,0,0,0,15,29,40,43,193,34,...
Thanks Kurt!!
UPDATE:
int myCommand[8] = { 245,1,0,0,0,0,0,0 };
int str1, str2, str3, str4;
I wonder if i'm doing this correctly. Please correct me. This is what i did:
fscanf(fp, "%s %s %s %s", str1, str2, str3, str4);
two[1]= str1;
two[2]= str2;
two[3]= str3;
two[4]= str4;
alright thanks for the suggestion. Too many thing now and i keep forgetting things.
its in write() library, the write() will return you the number of byte as long as you set the correct parameter for it.
Owh sorry! i forgot to change the 801 to 8..my mistake. now it works properly already. thanks for pointing it out.
Now what i have to do is how to transfer an array which have the following value...
Tried already, my device seems to respond but the error is still there. 42 byte were sent.
This is what i've done:
unsigned char myCommand[810] = { 0xf5,0x01,0x00,0x01};
unsigned char two[50];
two[1]= "0x03";
two[2]= "0x00";
two[3]= "0x03";
convert? is there any other method without altering the original data?
This is what i did:
unsigned myCommand[100] = { 0xf5, 0x01, 0x00, 0x01, 0x03, 0x00, 0x03, 0xf5,};
result2 = write(mainfd, myCommand, sizeof(myCommand));
now my .txt file content is...