|
Post by JJ on Nov 26, 2007 12:11:56 GMT
Hi, I need to find out what these lines of code are doing? The purpose of the code is to get information from a machine via RS232. The string of information its prog is getting is being manipulated but I can't figure out what hell its doing? Any help explaining these 6/7 lines would be appreciated. Thanks in advance.
'Read pressure from inst '--------------------------------------- OPEN "COM1:9600,S,7,1,CD0,CS0,DS0,OP0,RS" FOR RANDOM AS #1 c1! = 0 c1$ = "" s1$ = "" a$ = CHR$(27) + "P": PRINT #1, a$ s1$ = "": c1$ = "" a$ = INPUT$(15, #1) CLOSE
s1$ = LEFT$(a$, 1) c1$ = MID$(a$, 3, 8) c1! = VAL(c1$) 'inst Pressure value IF in = 2 THEN c1! = c1! * 10 IF s1$ = "-" THEN c1! = -c1! 'Convert to -ve val if -sign
RETURN
|
|
clippy
Junior Member
Posts: 32
|
Post by clippy on Nov 26, 2007 22:49:05 GMT
I believe your post was answered at another site! Please go look for it! You should not post questions on 10 different sites.
Ted
|
|