BASIC module on SLC 500- basic program question

Skidood

Member
Join Date
Oct 2016
Location
Ontario
Posts
215
Hi all

I have a SLC 5/04 with a BAS module sending print data to a dot matrix printer. In the Basic program in this module, there are what possibly appears to be indirect addresses which are actually integers present in the PLC program. These integers change based on cycle recipes chosen by the operator. These addresses (at least that's what I think they are) are denoted with a "MO" followed by another number in brackets.
Please see the attachment to see what I am talking about.
What I want to do is add a new line of print referencing a new integer from the PLC. No problem adding another line to the code. Problem is, I dont what or where these MO things are. Also no idea what the CHR thing is. Any basic pros out there?
Also, how do I upload the modifed BAS file to the Basic module? I used to know this, back in the day....
 
Last edited:
CHR is a function that converts ASCII code to a character, so CHR(10) is a newline a.k.a. linefeed.


The MO references could be an array or a function, or it may be something special in the BASIC module of the PLC.


I have no idea how any of this worked; I would google the stffing out of it if I had to do this.
 
It's been ages since I used a Basic module, but here's what it looks like to me, assuming you are using a 1746-BAS or 1746-BAS-T and not a third party module.

MO(x) appears to just be a Basic module variable array.

I'm not sure without seeing the rest of the code, but they could be copying up to 64 words and copying them to the MO(x) array in the Basic Module program.

Somewhere above the lines you shared should be a "CALL 56" to transfer data from the M0 file in the PLC code. The "PUSH" command above it sets the amount of words to transfer.

After that will be some type of CALL with a PUSH 100-163 before it adn a POP MO(x) after it.

In the PLC program there should be a copy to an #M0.Y.Z, where Y is the slot number and Z is the word.

These 2 manuals may help:
https://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1746-rm001_-en-p.pdf
https://literature.rockwellautomation.com/idc/groups/literature/documents/rm/1747-rm001_-en-p.pdf
 
The M0 & M1 files exist in the SLC, these are used to transfer data from/to the Basic card so for example the print will print the text plus the data in the M register(s). It's been many years since I used one of these the M0/M1 files are used to transfer 64 words each I believe so these are the basic buffer memory.
 

Similar Topics

Hi all, Great forum you have here !! I am not a programmer, but have some basic ability to work with PLC's. (Rudimentary use of RSLinx, RSLogix...
Replies
4
Views
2,749
Hi everyone.. I have 1 basic module SLC 500(1746 Bas), now i want to back up programmed (upload), but i dont know to cumunicate with this...
Replies
3
Views
4,704
Hi, I am looking for some help into programming a system involving basic module. The system is with SLC 5/05. I have to send info. of...
Replies
3
Views
5,564
By using the PRT1 Port can I communicate using the HyperTerminal Com1 port of my PC. I would like to modify the program inside the Module...
Replies
3
Views
1,668
Hi all, Just have a quick question (might be a dumb one that I should know) about how to determine what the scan time is of the module. I don't...
Replies
1
Views
3,939
Back
Top Bottom