1476-BAS with SEW Eurodrives

phuz

Member
Join Date
Jun 2008
Location
Mohnton, PA
Posts
1,043
I don't believe I ever touched a basic module, but I'm doing a project that involves one communicating with SEW Eurodrives. We are adding new drives to the line, so I need to give them new addresses. Setting them on the drive, itself, seems straightforward. I need some assistance in what utilities I need to set up the basic module, as I see it's set in the module itself and not the program. Is there software I can use to set this module up for these additional addresses?
Currently, the module is in slot 4, and they use a timer to cycle through the drive speeds, I believe. So they set O:4.2 to an integer value equal to what I believe is the drive's address, and they set O:4.3 to a value representing speed. I'm guessing I can't just add the "new" addresses at the end of the current ones because that would be too easy. :)
 
Last edited:
It's a very long time since I have worked with a basic module then is with a PLC2 processor.
check with AB as to what software you need you may only need a terminal emulator.
the address O:4.2 leads me to believe its an analog output module channel 2 channel 3
most likely -10 to +10 vdc speed and direction reference to the drive.
we need more information to help better.
the Basic module passes data to and from the ladder program
the last basic module I worked on had only RS232 ports available ,programming and on to the CRT display
 
It's a very long time since I have worked with a basic module then is with a PLC2 processor.
check with AB as to what software you need you may only need a terminal emulator.
the address O:4.2 leads me to believe its an analog output module channel 2 channel 3
most likely -10 to +10 vdc speed and direction reference to the drive.
we need more information to help better.
the Basic module passes data to and from the ladder program
the last basic module I worked on had only RS232 ports available ,programming and on to the CRT display

No, as I stated, the BASIC module is in slot 4.
O:4.2 and O:4.3 are going to the BASIC module, not an analog module.

Capture.jpg
 
The 1746-BAS is a little BASIC-52 computer with a backplane interface to the SLC.

If you don't have the BASIC program that was loaded into it, you have to extract it through the serial console connection.

You literally connect with a terminal emulator to the serial port, tell the computer to stop executing (Control-C), then tell it to LIST the program it's running. It will print out the program to the console.

Once you have that program, you can try to figure out how the designers use the data from the SLC to create a command list or similar to control the SEW Eurodrive devices.

Be sure that your BASIC module isn't actually a Prosoft version, running a Modbus Master driver. Those were physically identical to the 1746-BAS, but had an EEPROM from Prosoft in them. Generally they also had a Prosoft label, but a few times I have encountered hacked-together units.
 
The 1746-BAS is a little BASIC-52 computer with a backplane interface to the SLC.

If you don't have the BASIC program that was loaded into it, you have to extract it through the serial console connection.

You literally connect with a terminal emulator to the serial port, tell the computer to stop executing (Control-C), then tell it to LIST the program it's running. It will print out the program to the console.

Once you have that program, you can try to figure out how the designers use the data from the SLC to create a command list or similar to control the SEW Eurodrive devices.

Be sure that your BASIC module isn't actually a Prosoft version, running a Modbus Master driver. Those were physically identical to the 1746-BAS, but had an EEPROM from Prosoft in them. Generally they also had a Prosoft label, but a few times I have encountered hacked-together units.

Thanks, I'm assuming any changes have to be loaded line-by-line, though?
 
My recollection (and this is early-1980's technology) is that BASIC52 has to be loaded all at once, basically by doing a PRINT from the terminal emulator to load the program line-by-line.

I don't think you can edit a BASIC52 program by just writing over one numbered program line.

There's an A-B user manual that describes their terminal program, called PBASE or WINBAS. You really don't need that, just an ordinary terminal emulator like PuTTY or HyperTerminal.

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/16897

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/22755
 
My recollection (and this is early-1980's technology) is that BASIC52 has to be loaded all at once, basically by doing a PRINT from the terminal emulator to load the program line-by-line.

I don't think you can edit a BASIC52 program by just writing over one numbered program line.

There's an A-B user manual that describes their terminal program, called PBASE or WINBAS. You really don't need that, just an ordinary terminal emulator like PuTTY or HyperTerminal.

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/16897

https://rockwellautomation.custhelp.com/app/answers/detail/a_id/22755

That actually works better for me. Hopefully Putty will be sufficient.
 
I uploaded the program today. Can someone help me decode this a bit?
It looks like lines 130/140 are being used as a timer.
I don't understand the terms PUSH/POP/CALL nor the numbers being used with them.
I'd like to understand how the data is getting to/from I:4 and O:4 registers.
If I'm reading any of this right, it looks like I don't even need to change this code. I just need to add the new address in the logic and this code will automatically handle it.

Code:
10     MODE (PRT2,9600,E,8,1,N,R)
20     PUSH 2 :  PUSH 10 :  PUSH 0 :  PUSH 0
30     PUSH 2 :  PUSH 0 :  PUSH 01 :  CALL 22 :  POP REPLY :  PRINT REPLY
40     CALL 53 :  POP X :  IF X<>0 THEN  PRINT "processor not in run mode"
50     PUSH 202 :  CALL 14 :  POP A
60     PUSH 203 :  CALL 14 :  POP S
70     IF S<0 THEN S=S+256
80     PUSH 204 :  CALL 14 :  POP R
90    BCC=(((129.XOR.A).XOR.S).XOR.R)
100    PRINT A,S,R,BCC
110    PH0. #CHR(02),CHR(A),CHR(85H),CHR(00H),CHR(06H),
120    PH0. #CHR(S),CHR(00H),CHR(R),CHR(00H),CHR(BCC),
130    FOR I=0 TO 200
140    NEXT I
150    GOTO 40
160    REM LINES 10, 20 SET UP TRANFER OF REPLY TO PLC I:3.0...
170    REM A=ADDRESS, S=SPEED 0 TO 64, R=RAMP TIMES .256 SEC
180    REM com1 1200 8 1 n
 
The 1747-BAS has both a User Manual and a Reference Manual that describes is vendor-specific BASIC commands, like the numbered CALL functions.

The Reference Manual (1746-RM001A) is probably best for this.

I think your interpretation is correct, that the SLC program just feeds values for the Address, Speed, and Ramp to the module along with a drive number. As long as your PLC program feeds the new values and drive numbers in, the module should process them.

"Push" and "Pop" are old BASIC commands that set up a microcontroller memory "stack" so you can run commands.

"CALL" runs a platform-specific subroutine. Because the BASIC52 system on this module has to do SLC backplane interface functions, most of the CALLs you see have to do with that.

CALL 22 sets up the serial port -> SLC Input Data block link, based on seven arguments that are "pushed" into the microcontroller memory stack from seven constants in the BASIC program (2,10,0,0,2,0,1).

CALL 53 grabs the SLC Output Data block and puts it into the BASIC module memory. It has one output, so it "pops" the data off the microcontroller memory stack into a variable that gives the status of the SLC (run/prog).

The destination of the CALL 53 are considered memory buffer locations 200-207. That will be important in a moment.

CALL 14 converts an SLC-style integer that's in the BASIC module input buffer into a floating-point value that can be used in the BASIC module. It needs one argument from the stack, so we load up the stack with a "Push", and it gets one argument in return from the stack, so we unload the result with a "Pop".

So Line 50 does this: "PUSH 202 : CALL 14 : POP A"

Remember Call 53 ? That brought data from the SLC Output image into the BASIC module's memory at locations 200-207.

Since the BASIC module is in Slot 4, from the SLC-500 program file perspective, that's O:4.2 which lands in Memory Location 202 and gets converted into a floating point value and stored in a BASIC variable called "A".

Those three PUSH/CALL14/POP commands transfer

O:4.2 -> A ("Address")
O:4.3 -> S ("Speed")
O:4.4 -> R ("Ramp")

The module then spits those values out the serial port to the SEW Eurodrive.
 
More info about serial ports because it confused me a little.

You'll see references to the "Console" as well as to Port 1 and Port 2.

In general, Port 1 is where you plug in your laptop and run a terminal emulator, so that's the "Console". Some commands always send data to the Console.

On this module we see the program setting up Port 2 in the first two lines, so that's what plugs into the SEW Eurodrive devices.

Serial port interface commands can be directed to three places. Example:

PRINT Sends data to the Console, which is usually Port 1
PRINT @ Sends data to Port 1 explicitly
PRINT # Sends data to Port 2 explicitly.

When Line 100 does a "PRINT A,S,R,BCC", those values are printed to the console. If your laptop is hooked up, you'll see them show up in PuTTY, so that's a sort of diagnostic data stream.

When Lines 110 and 120 use a "PH0. #", they are doing a 2-digit Print Hex command to Port 2.

I'm not totally sure how the hex bytes will look, because I'm a little confused about when the PH0.# instruction appends an "H" to the string, but if it works, it works.
 

Similar Topics

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,242
Hi! Please share the MODBUS protocol code for the subject Regards
Replies
10
Views
2,364
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,983
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,693
Hello all, Has anyone here ever attempted to integrate Allen-Bradley PLCs into an existing Barber Colman BAS system? Looking for help on how to...
Replies
5
Views
1,493
Back
Top Bottom