Rockwell-automation 1746-BAS BASIC LANGUAGE User Manual Page 233

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 232
Publication 1746-RM001A-US-P
Input Functions 13-43
LD@
Purpose
Use the LD@ statement to retrieve floating point numbers that were stored with a
ST@ statement. The expression [expr] following the LD@ statement specifies the
address where the number is stored after executing the LD@. The LD@ statement
places the number on the ARGUMENT STACK at the address location specified
by [expr].
This statement can be used with CALL 77 to retrieve variables from a protected
area of memory. This protected area is not zeroed on powerup or when the RUN
command is issued.
Syntax
LD@ [expr]
Example
>P. MTOP
24515
P. MTOP 10*6
24455
>PUSH 24455 : CALL 77
>1 REM EXAMPLE PROGRAM
>5 DIM A(10),B(10)
>10 REM *** ARRAY SAVE ***
>20 FORI=0TO9
>30 A(I) = I+20
>40 PUSH A(I) : REM PUT NUMBER ON STACK
>50 ST@ 5FFFH–I*6
>60 NEXT I
>70 REM *** GET ARRAY ***
>80 FORI=0TO9
>90 LD@ 5FFFH–I*6
>100 POP B(I) : REM GET NUMBER FROM STACK
>110 PRINT B(I)
>120 NEXT I0
IMPORTANT
This instruction is not associated with any port designation.
IMPORTANT
LD@ is not used with any port designation.
Page view 232
1 2 ... 228 229 230 231 232 233 234 235 236 237 238 ... 279 280

Comments to this Manuals

No comments