Help - Search - Members - Calendar
Full Version: Basic Module and M1 file communication
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
KevinR
I'm having a problem with my Basic Module's (1746-BAS) communication with my SLC 5/04. I wrote a BASIC program which uses CALL 22 to transfer 15 characters over to the SLC, which would hopefully copy them to my N43 file.

Here is my BASIC code:
CODE

10 MODE (PRT2,9600,N,8,1,N,R)  : REM Set PRT 2 com
12 CALL 18 : REM Ensure CTRL-C is enabled for STOP
20 PUSH 2 : REM PRT 2
30 PUSH 15 : REM transfer 15 characters
40 PUSH 0 : REM No delimiter
50 PUSH 1 : REM USE M1 file
60 PUSH 0 : REM NO offset
70 PUSH 0 : REM NO string
80 PUSH 1 : REM byte swap
90 CALL 22
100 POP S
110 IF (S<>0) THEN PRINT "UNSUCCESSFUL CALL 22 SETUP"
120 REM CALL 22 Loop
125 GOTO 120
130 END


In the BASIC manual from AB (1746-rm001_-en-p), it gives an example ladder to use, but it doesn't seem to work for me. If anyone with more experience with this than myself could help, I'd be greatly appreciative.
KevinR
I think I may have figured it out. In their examples they latched a bit that doesn't need to be latched. Hopefully this will clear up my problems. oops.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.