Hi knob
Thanks very much!
I coommented the line set aspect RXDATA ON and it works.
It take a long long time to complete the proc. It take a very short time when I use waitfor command,but I can't get the result which response by the command that I sent when I use the waitfor command.
Please help...
from the help document:
aspect rxdata ON/OFF
Specifies whether Procomm Plus or a script processes characters received from the communication port. The default, OFF, indicates that Procomm Plus processes received characters. With set aspect rxdata ON, the script must handle incoming data with...
when i am using rget command,i writed code like this,but i does not work as my expected: (remote target is a linux guy)
transmit "echo done ^m"
String receiveLine
set aspect RXDATA ON
rget receiveLine
while 1
rget receiveLine...
I know, I think you make me wrong. :)
call methods[methodId]
methods just a string array , methods[methodId] just return one of values of "abc" "efg" "hig"
call methods[methodId] is call functions abc, efg, hig dynamically, I won't to write switch/case structure, because I have many many thus...
remote send the 0000> as the end of response.
how to write waitfor?
but when I write blew code line,it seems not work fine:
waitfor "0000>"
please help!
thanks knob, switch/case is better, but...
my mean is that:
String methods [3]
methods[0]="abc"
methods[1]="efg"
methods[2]="hig"
then i define three functions:
func abc
....
endfunc
func efg
...
endfunc
func hig
...
endfunc
I want to do this:
integer methodId...
Hi all friends, need help:
I have a string array ["abc","efg","hig"] named methods and three functions
abc() efg() hig()
I want to do something like this:
if methodname=="abc"
call abc
else if methodname=="efg"
call efg
else methodname == "hig"
call hig
but this is not neat,right? I...
thanks, knob
I have got another way to do this. :)
my piece of code:
fgetc 0 Chr
sum+=Chr
sum=sum & 0xff
checkSum=256-sum
fseek 0 offset 0
fputc 0 checkSum
yes, you are right. Rock!
Thanks knob.
But i have another question.
How to interact with the term? for example: i have to write a script that get user input from term and then decide what to do next.
how to do this? thanks
hi knob:
thanks for your prompt reply.
but i can not find any useful information about crc16 and byte operations. would you give me some hints.
Thanks.
anybody help?
Is there any data type like char to handle byte data?
My work is that to read data from binary file byte by byte, i know using fgetc function to get one byte data, but how to do the zero checksum? help,please. Thanks
Hi friends:
I have a problem, need help.
I capture data to a binary file,and have to zero checksum one sector of data.
The binary file like this:
00 01 02 03 04 05 06 07
00H: 0xa0 0x12 0x13 0xf0 0xf1 0xc2 0xc4 0xea
08H: 0xab 0x32 0x13 0xf0 0xb1 0xc5 0xa7 0x5a
10H: 0xb0...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.