DL06 PLC and GS3 dirve math issue

SuperCoupe

Member
Join Date
Oct 2017
Location
Hoosier
Posts
2
All,

Have not programed a PLC in a couple years and my new job asked me to do a simple project and I thought it would be easy, but I have ran into a problem sending the correct drive speed in HZ from the plc. This is my first time using Directsoft 6 software. I have searched all over the forum/internet but nothing seems to help.

Back ground.
Using a EA9 HMI, DL06 PLC and a GS3 drive. It is a basic system that you put a time and RPM into the HMI to run a drive at a set rpm for a set time. The time part works great, but on the RPM side keeps giving me problems. Currently the output is always rounding down, I think it has to due with using HEX, but I can not figure it out for some reason have have tried for two days using all different commands, but still no luck.

Here is what I currently have:

-LD V402 (loads value from HMI, have tired BCD and signed int)
-DIVB K3b (59 is used to convert from RPM to HZ)
-MULB K10 (multiply be 10 to get to correct number of digits)
-BIN
-OUT V3000 (outputs to drive in HZ)

It works but it always rounds down, so if it comes out to 15.6 HZ it out puts 15.

Example:
-LD V402 500 RPM from HMI
-DIVB K3b 59 (used to convert RPM to HZ for this motor)
-MULB K10
-BIN
-OUT V3000 drive run at 8Hz, 472 RPM, but I need to to be 8.47 500 RPM

I am sure that it is something simple, but I can not figure it out.

Thanks in advance for any help.
 
You need to multiply, then divide. The accumulator can hold the double word result from the multiply, then the divide will drop it back to a single word.

Or use REAL for the entry and math then convert RTOB for the output.
 
If you get too anal about the drive matching the signal, most drives have an analog bias or gain feature that allows you to bump up or down the input signal. Meaning, you can essentially make the drive add a few mA or Volts to the analog input that it is receiving.
Kind of a Sneaky Pete way to do it tho...
 
Are you using BCD or binary from the HMI? Make up your mind.

If it is BCD from the HMI then convert to binary FIRST using the bin command.
(If the value is already in binary then just do the following, don't do the BIN command)
Then do the MULB with Ka (not K10)
Then DIVB K39. (not sure why you are using 59 instead of 60 but whatever)
Finally OUT V3000
 
Last edited:
It is working, thanks for all the help.

All I had to do was switch the multiply and and divide like Mike said and it is working.

Thanks again.
 
If all you did is swap the multiply and divide instructions you may find strange results for some HMI entries. Try a sequential series of entries stepping up by 1 each time. Be sure do enter at least 10 or maybe more like 20. Watch the results. If they are ok then fine. If not come back to this thread.
 
All,

Have not programed a PLC in a couple years and my new job asked me to do a simple project and I thought it would be easy, but I have ran into a problem sending the correct drive speed in HZ from the plc. This is my first time using Directsoft 6 software. I have searched all over the forum/internet but nothing seems to help.

Back ground.
Using a EA9 HMI, DL06 PLC and a GS3 drive. It is a basic system that you put a time and RPM into the HMI to run a drive at a set rpm for a set time. The time part works great, but on the RPM side keeps giving me problems. Currently the output is always rounding down, I think it has to due with using HEX, but I can not figure it out for some reason have have tried for two days using all different commands, but still no luck.

Here is what I currently have:

-LD V402 (loads value from HMI, have tired BCD and signed int)
-DIVB K3b (59 is used to convert from RPM to HZ)
-MULB K10 (multiply be 10 to get to correct number of digits)
-BIN
-OUT V3000 (outputs to drive in HZ)

It works but it always rounds down, so if it comes out to 15.6 HZ it out puts 15.

Example:
-LD V402 500 RPM from HMI
-DIVB K3b 59 (used to convert RPM to HZ for this motor)
-MULB K10
-BIN
-OUT V3000 drive run at 8Hz, 472 RPM, but I need to to be 8.47 500 RPM

I am sure that it is something simple, but I can not figure it out.

Thanks in advance for any help.
Change your data type on the EA9 to floating point 32 so you are using real numbers. BCD and integers don't do decimal places, so anything after the decimal point will be dropped.

Try modifying your logic to this:

LDR V402 (loads real number)
DIVR R5.9 (multiply by real number 5.9, also eliminates multiplying by 10)
OUTD V3000 (outputs real number to V3000)
Hope that works.
 

Similar Topics

A customer of mine sent me a hard copy printout of the program, I'm modifying the printout program and sending it back to him to make the...
Replies
3
Views
1,743
I have a DL06 PLC from Automation direct and I am trying to learn how to use the expansions slots in my program. Coming off of allen Bradley...
Replies
20
Views
6,229
Hello all, I am currently trying to write a program that will use solenoids to push buttons on an interface board and a stepper motor system to...
Replies
1
Views
2,189
I'm trying to communicate a code bar reader (metrologic MS9540)with a DL06 PLC with the next communication adjustments: --------PLC SetUp...
Replies
8
Views
6,471
I am working on a Lookout direct scada communicating to a DL06 PLC through wireless Ethernet.The problem I am facing is, intermittent loss of...
Replies
3
Views
7,176
Back
Top Bottom