Rockwell Automation 1203 Serial Communications Module Series B User Manual
Page 46

4–12
Configuring and Interfacing
1203–5.5 September 1995
550 REM ****************************************************************
560 REM ********* PLC TYPED READ Subroutine *****
561 REM ********* inputs Parameter number in var PAR_NUM *****
562 REM ********* ASC coded hex string of value in $(1) *****
563 REM ********* outputs: failure message *****
565 REM ****************************************************************
570 REM subroutine to do a typed write of a single parameter
580 PRINT ”Executing PLC Remote Write ”
600 PUSH 5 : REM PLC5 Typed Write
610 PUSH 1 : REM Communications Module Node Address
620 PUSH 10 : REM File Number ( atterss is N10:PAR_NUM)
630 PUSH ASC(N) : REM Communications Module File Type
640 PUSH PAR_NUM : REM Starting Word in File
650 PUSH 1 : REM Number of Words to Transfer (one parameter)
660 PUSH 50 : REM Command Time–out (x100ms)
670 PUSH 2 : REM Data Source (2 = Internal String)
680 PUSH 0 : REM Offset in M0 file (Not used in this example)
690 PUSH 1 : REM String # ASCII hex number order low, high
700 CALL 123 : REM Builds the message to be sent
710 POP S
720 PUSH 123 : REM sets up call 29
730 CALL 29 : REM send the message
750 RETURN
760 REM *********** End Write parameter subroutine *********