Need Help with 1746-BAS error

bfore

Member
Join Date
May 2011
Location
Detroit
Posts
6
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, we lose the program. (replaced battery already, problem still existed)
So, we received a replacement module (from a working machine).
I matched the jumpers on to the current module, installed it.

using hyperterminal, i called the program from the old module, loaded it and when executing run command received the error "a-stack error in line 180"

I replaced the module with the old one again, did same procedure and it loads flawlessly...

Need some help here, not an expert by any means..
Does the new (used) module need to be factory reset?
Are the jumper settings supposed to be same?
Is my new module no-good?

Looking forward to your comments
Thanks
 
error "a-stack error in line 180"

We can't even begin to guess without seeing the program. You could post it, if allowed, as a text file. Line 180 will be the focal point.

when our machine powers down, even momentarily, we lose the program.

After a program has been developed it should be stored, using the PROG command, into the EEPROM. It should be program 1.

If there are other programs in the EEPROM then, after verifying that they are not needed, delete them one at a time using the ERASE command.

After it is stored the BASIC module can be commanded, on power up, to run program #1 from the EEPROM by using the PROG 2 command.

Be sure to get the BASIC Language Reference manual from AB and read about all these commands before using them.

I have no idea if your module is bad.
 
Ok well further to your response..
Why would the current (or old as I'll refer to it) Basic module be losing its program every time we power off the machine.
This machine has been running, with a short interruption about 6 months ago when we originally needed to replace the battery in the basic module, since then it was running fine. Then last week we experienced the same problem, had it diagnosed as a battery issue again, replaced battery, but this time we are having no luck with it retaining memory (ie. when power shuts off, module loses its program when machine is restarted)

Secondly to that, I was advised to purchase a new Basic Module, so instead i purchased a used on from a working machine tear down..
I would have thought setting the jumpers the same, loading the program from the current module into new module would have yielded me successful results. Its during the loading or "run" command when attempting to load new module that i get this error...strange thing is there is no line #180

I will post the txt of the program here once i have it....our electrician is sending to me soon...
 
...and one more note for clarity...
When i re-install the original module (the one that won't retain program after powerloss) i am able to simply load the program on hyper terminal, type run command and it loads and machine functions
That is the confusing part why the new module doesn't act the same..
 
I think your problem may be that you are loading a program onto an existing Basic module (with a program already in it). Here is a list of some common commands. Make sure you are hitting control C to stop the program from executing. I would then choose ERASE or NEW before loading the program.

What I've seen is if there is a program already in RAM, then loading a new program will not necessarily replace the existing program - especially if the number is different - it will just add to it. After loading the program, type list and see if the new program is in there line for line. Also, I don't use the eeprom so I've never dealt with that. This is pretty much what Bernie is telling you in the earlier post.

You could also default the basic module by pulling the battery and shorting between the + and - terminals on the card - not the battery (but I've never done this before).

Command Function
CONT CONTinue program execution after a STOP statement or CONTROL-C command.
CONTROL-C Stop current program execution in Run mode and return module to Command mode. CONTROL S Interrupt a LIST command.
CONTROL Q Restart a LIST command after a CONTROL S command.
DISABLING CONTROL-C Disable the CONTROL-C break function. CALL 18 disables the CONTROL-C break function. CALL 19 re-enables the CONTROL-C break function.
ERASE Erase the program stored in ROM.
LIST LIST current program or indicated lines of program to the console device.
LIST# LIST current program or indicated lines of program to the device connected to port PRT1.
LIST@ LIST current program or indicated lines of program to the device connected to port PRT2.
MODE Set up port parameters. MODE(DH485,19200)
NEW Erase the program stored in RAM.
NULL Count the number of null characters the module outputs after a carriage return.
PROG Program the EEPROM module with the current program.
PROG1 Program the EEPROM module with port information for all three ports and store MTOP information.
PROG2 Execute the first program stored in EEPROM when the module is turned on.
RAM Select the current program from RAM.
ROM Select the current program from EEPROM.
RUN Execute the currently selected program.
XFER Transfer a program from EEPROM to RAM, then select RAM mode.

 
So you were right...!!
i cleared the old program and was able to load new program to new basic module...

turns out none of my issues were related to needing new module :(

here is the new or current issue...
The program is staying in the module, even during power down, but when I powerup the basic module isn't in Run mode anymore...
The green light flashing..
When I reconnect to it, type run, it returns to run mode and operates.

HELP!!

:)
 
Ok...thanks for advice..
Machine is fixed!!
Turns out our electrician changed jw4 and it wasn't in the right mode...grrrrr!!!!
Its been a learning experience at very least...
 
From post #3:

Snip...
I will post the txt of the program here once i have it....our electrician is sending to me soon...
Just interested in learning a little bit about the programming techniques, I've never done any AB Basic stuff, thanks.
 

Similar Topics

hi everyone, i have AB 1746-nt4 card but with missing cjc thermistor(both side) , how could i buy the cjc?,any special specs should i follow on...
Replies
5
Views
3,055
Does anyone have any programming examples of using a 1746-HSCE encoder module in a linear motion situation. I have configured the Mfiles and...
Replies
4
Views
3,114
I am attempting to use a Mitutoyo SAM (Single Axis Multiplier)-15 connected to a Mitutoyo linear scale (AT102) with an Allen Bradley 1746-HSCE2...
Replies
4
Views
24,133
Hello nice to meet you, im new in here, I'm currently trying to convert code written in STL for a S7-400 to SCL for an S7-1500, because when i run...
Replies
5
Views
268
Back
Top Bottom