New to DirectSoft32

Bob O

Member
Join Date
May 2003
Location
Posts
1,875
AD experts…

Where do I find the remainder of say a division instruction? I am trying to reduce the error in my calculations because of integer math and rounding. The manual says it’s in the first stack location but I can’t locate it. I am testing on a DL105 but this code will go into a DL405 440 CPU that doesn’t floating point math.

Thanks,
Bob O.
 
Bob,

With no floating point functions, all you can do is shift your digits in all the number used in the calculation. The product will then have an apperant remainder in the final mem location.

Mike
 
Mike,

Got it. I was x and / by 10 and 100 to move my decimal point but just needed to go one step further.

Thanks,
Bob

Now I have another toy (DL105) on the test bench to play with...I hope the AB 1000 and 1500 don't get mad.
 
The 105 is a nice unit but I've had a fair share of failures for no appearant reason. What I like abotu the 105 that the 05 dosnt have is the aux 24vdc power supply. It comes in handy when using an encoder.
 
Mike,

I found out about a month ago that there was a design problem with the 105 series from sept 03 to Oct 04 (when I identified it for FACTS). Apparently, the wrong flux was used on a capacitor and if it got hot enough, the residual flux would melt and cause the PLC to lock up. Strangest thing was after a couple of days, sometimes the PLC would start working again.The flux that was causing the problem evaporated away (or so I was told). They were not aware of the problem until I called and talked to one of their engineers about it and explained what I was seeing. I had a few of the 105s that would just, for no obvious reason, drop out of run mode. I also had 2 others that would stop communicating throught he serial port. It has since been fixed and they will repair any that are between those dates.

Bob
 
$hit... I lost about 4 of them. Two I replaced with same the other two I replaced with 05s. Told the techs to toss them all. It was hardly worth the paper work and shipping etc.. Now I know better...
 
To Bob O and others working with AD division. The remainder is indeed on the stack. Save (OUT) the result of the division then perform a POP instruction to bring the remainder into the accumulator. Then you can save this and start playing with it.

Remember that the AD division gives you the actual unrounded quotient while AB gives you a rounded quotient (unless you delve into the dreaded MATH REGISTERS which hold the actual unrounded quotient and the remainder).
 

Similar Topics

Hello, In uni, ive only seen 2 kinds of PLC and softwares those are Allen bradley and siemens, now I go used to SPC commands on RsLogix for...
Replies
2
Views
1,571
Anyone know how to accomplish an off-delay timer in Automation Directs Directsoft32 software?
Replies
3
Views
3,000
I have ben unable to locate a user manual for DirectSoft32was wondering if someone has ran across one and can direct me in the right spot i tried...
Replies
3
Views
2,151
I have Direct logic 06 plc and its installed on com4, but directsoft 32 programm shows only two port(com1 and com2)how i can see com4. I can not...
Replies
2
Views
1,968
Does anyone know when AD will store the ladder logic along with comments and nicknames to the PLC? This way I don’t have to carry around the...
Replies
4
Views
2,102
Back
Top Bottom