You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old December 6th, 2017, 04:04 PM   #1
phuz
Member
United States

phuz is online now
 
Join Date: Jun 2008
Location: Mohnton, PA
Posts: 763
1476-BAS with SEW Eurodrives

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 by phuz; December 6th, 2017 at 04:28 PM.
  Reply With Quote
Old December 6th, 2017, 04:55 PM   #2
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 718
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
  Reply With Quote
Old December 6th, 2017, 05:08 PM   #3
phuz
Member
United States

phuz is online now
 
Join Date: Jun 2008
Location: Mohnton, PA
Posts: 763
Quote:
Originally Posted by GaryS View Post
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.
Attached Images
File Type: jpg Capture.jpg (30.8 KB, 58 views)
  Reply With Quote
Old December 6th, 2017, 06:57 PM   #4
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 14,161
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.
  Reply With Quote
Old December 6th, 2017, 07:27 PM   #5
phuz
Member
United States

phuz is online now
 
Join Date: Jun 2008
Location: Mohnton, PA
Posts: 763
Quote:
Originally Posted by Ken Roach View Post
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?
  Reply With Quote
Old December 6th, 2017, 07:33 PM   #6
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 14,161
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....ail/a_id/16897

https://rockwellautomation.custhelp....ail/a_id/22755
  Reply With Quote
Old December 6th, 2017, 08:01 PM   #7
phuz
Member
United States

phuz is online now
 
Join Date: Jun 2008
Location: Mohnton, PA
Posts: 763
Quote:
Originally Posted by Ken Roach View Post
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....ail/a_id/16897

https://rockwellautomation.custhelp....ail/a_id/22755
That actually works better for me. Hopefully Putty will be sufficient.
  Reply With Quote
Old December 13th, 2017, 10:35 AM   #8
phuz
Member
United States

phuz is online now
 
Join Date: Jun 2008
Location: Mohnton, PA
Posts: 763
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
  Reply With Quote
Old December 13th, 2017, 04:15 PM   #9
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 14,161
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.
  Reply With Quote
Old December 13th, 2017, 04:41 PM   #10
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 14,161
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.
  Reply With Quote
Old December 14th, 2017, 07:33 AM   #11
phuz
Member
United States

phuz is online now
 
Join Date: Jun 2008
Location: Mohnton, PA
Posts: 763
Ahh, thanks Ken. When I was watching it in putty, I saw those numbers but didn't know how to interpret them. Awesome!
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
S7-1200 with sew movidrive b profinet communication JEANST LIVE PLC Questions And Answers 4 August 21st, 2015 08:09 AM
s7-300 and sew inverter tulip LIVE PLC Questions And Answers 1 July 6th, 2014 03:04 AM
1768-L45 and a SEW drive problem grahma LIVE PLC Questions And Answers 7 May 10th, 2014 01:25 PM
SEW Eurodrive & HMI choice? kvogel LIVE PLC Questions And Answers 2 December 19th, 2012 10:58 AM
Slc 500 - Bsn - Rio - Pv capriconian20 LIVE PLC Questions And Answers 34 May 19th, 2007 08:22 AM


All times are GMT -5. The time now is 09:49 AM.


.