1746-bas Help

InControl

Member
Join Date
Oct 2004
Location
Arkansas
Posts
29
I am trying to use a 1746-BAS module in a SLC 5/03 to poll 3 Slaves
DF1 Half Duplex. I have lots of PLC experience but very little BASIC Module experience. I have read all the articles on the ab.com site pertaining to BAS module.
I am trying to use CALL 108 to set up port 2 for DF1 and CALL 123 to write to remote DF1. My BAS module is in Slot 3. So far I'm not having much luck.

logic.jpg
 
Er...

I can't help you with the BASIC module (too many years since I worked with one), but the code you posted sure is fishy.

On rung 23 you latch O:3/11 if O:3/11 is already set ?!? That doesn't make sense.

I think that what you are trying to do a CALL 53 in the BASIC module, and use O:0/13 as a flag to indicate that there is new data ready for the BASIC module. Is that it?

From what you say, you are trying to get data into the BAS module's port. The BAS module can be run stand-alone, and doesn't have to transmit any data back to the SCL.

Try using Print statements in your BAS program to see what kind of data the BAS module thinks it's getting.

Posting your BASIC code may be of more use than posting your PLC code, for now.
 
10 REM: CALL 108 ENABES THE DF1 COMMUNICATION TO PRT2
15
17
20 MODE (PRT2,9600,N,8,1,N,R)
30 PUSH 3
40 PUSH 10
50 PUSH 3
60 PUSH 4
70 PUSH 4
80 PUSH 3
90 CALL 108
100 PUSH 2
110 PUSH 2
120 PUSH 15
130 PUSH ASC(N)
140 PUSH 0
150 PUSH 5
160 PUSH 10
170 PUSH 1
180 PUSH 0
190 PUSH 0
200 CALL 123
210 POP S
220 IF (S<>0) THEN PRINT "UNSUCCESSEFUL CALL 123 SETUP"
222 GOTO 222
 
Thanks for your responses... More Info
What I am trying to do is get N118:0 out of one 5/03 and send it to n15:0 in another 5/03
originally i was using a MSG to do this but I had to install NET-ENI on CH. 0. So I added the basic module to give me an extra com port.

Having trouble understanding the way the BAS reads and writes, specifically - Call 122 is a Write to DF1.. does that mean the BAS is writing to other PLC or Local PLC?

Any suggestions are appreciated. Thank You All
 
Allen,

I agree with your suggestion....would love to do that, but it is not an option for me since i don't have an ethernet capable radio at the other end. I have serial radio modems in place and I have to go DF1 half duplex at these remote sites.
I have 2 radios at the site where the BAS module is...1 is ethernet radio sending info back to treatment plant. 2 is serial comms to other remote sites.

Thanks for you response.
 
Take a look at this. Maybe it will help. I haven't used this myself, so I don't know. Some of the other devices they sell might be what you need or could use. You might want to check out the rest of the website.
DF1 module
 
Your basic structure looks fishy I see your pushing various values onto the stack however you don't appear to be removing them from that same stack I believe the command is to POP from the stack inreverse order that they are pushed onto. Its been awhile since I've done basic. Also your 222 goto 222 will crate an endless loop
 
Last edited:
found this example on the AB knowledgebase. If you do a search for BAS module on knowledge base it'll give you several articles on the subject. (too many to post here) hope this will help




PREFACE

The following program will illustrate a way to import ascii data via PRT2 on the
1746 BAS module.

The ascii string being read in is "abcde"

1746 BAS Program
----------------


10 PUSH 3 :Argument for Call 120

20 CALL 120: :Clear M1 and M0 input/output Buffers

30 MODE (PRT2,9600,N,8,1,N,R) : Set up port2

40 PUSH 2 : Port 2 enabled

50 PUSH 20 : Send 20 characters to the M1 files

60 PUSH 13 : 0DH carriage return termination character

70 PUSH 1 : Send information to the SLC M1 file

80 PUSH 0 : Offset into the M1 file

90 PUSH 0 : Ignore internal string

100 PUSH 1 : Enable byte swapping

110 CALL 22 : Transfer data to SLC from PRT2

120 POP S : Status of processor

130 A = 2 : Set up dummy statement

140 GOTO 130 : Loop continuously back to line 130







SLC 500 Program
 
Thank You Mordred for the reply i appreciate it very much.
I don't grasp how that will allow me to send a specific value from the BAS SLC 5/03 to a specific location in the remote SLC 5/03.
Maybe I am missing something.

Thanks Again
 
InControl said:
I don't grasp how that will allow me to send a specific value from the BAS SLC 5/03 to a specific location in the remote SLC 5/03.

You can't.

The best you can do is Print# the data out of Port 2.

The receiving SLC will need to use the ARL (or ARD) instruction to take them from the DFI buffer and put them in the desired memory address (perhaps after a bit of massaging).

I still say you are making this too hard. A second NET-ENI and an ethernet modem system is the way to go.
 

Similar Topics

Hello everyone, I need help with programming 1746-BAS module. I am able to connect to PRN1 port via Hyperterminal and execute commands, even...
Replies
20
Views
5,428
A quick background.. I was told by our local AB supplier that i need to replace my basic module, when our machine powers down, even momentarily...
Replies
9
Views
11,044
Hello, We have an older SLC500 controlled system that is using a BASIC module to communicate to a third party device. Looking into converting the...
Replies
4
Views
1,276
I am trying to program a 1747-M2 EEPROM in a 1746-BAS module. I can download the program and I enter "PROG" and it says successful. I can use the...
Replies
5
Views
1,995
Hi, I am upgrading a AB PLc to Siemens PLC logic and everything is ready for siemens but the problem is the existing PLC is communicating to DCS...
Replies
7
Views
4,742
Back
Top Bottom