Programming in CSCAPE for Horner PLC

AshtonKoocher

Member
Join Date
Mar 2013
Location
US
Posts
4
Hello everyone,
I inherited programming Horner PLC's after a month of training from the previous guy at my work. I have mostly taught myself and have run into a problem I can't seem to figure out how to code.

Basically I have a wind head that measures wind speed. I have 3 stages set. At stage 1 wind(5-9 mph) I want a drive I am controlling to not be able to go to it's max (4th preset) output. At stage 2 wind speed(10-14 mph) I don't want the drive to be able to output it's max or upper medium (4th and 3rd) preset. And at stage 3 wind (15mph and higher) I want the drive to not be able to output anything but the lowest setting.

The thing that stumps me is, I am selecting the drive output (1,2,3, or 4) with a sequencer in the program, if the wind speed will not allow the 4th preset to run, I want to go to the 3rd preset without the drive staying off for the duration of the 4th speed being selected in the sequencer and so on with each change in wind speed.

Can anyone understand what I just typed and my question? Or do I need to try and explain it any better?

Thanks for any help yall can give.
 
Basically I have a wind head that measures wind speed. I have 3 stages set. At stage 1 wind(5-9 mph) I want a drive I am controlling to not be able to go to it's max (4th preset) output. At stage 2 wind speed(10-14 mph) I don't want the drive to be able to output it's max or upper medium (4th and 3rd) preset. And at stage 3 wind (15mph and higher) I want the drive to not be able to output anything but the lowest setting.

From what you have written I am assuming that you want to first start your drive with the maximum preset and then as the wind speed picks up you want to lower it's running frequency in stages corresponding to the appropriate wind speeds.

If that assumption is correct and if your presets are selected by four separate digital outputs from the PLC then instead of using a sequencer you should code using comparison instructions in a way similar to this:
|
| Run +--------+ Preset 4
|--| |----| WS < 5 |-----------( )
| +--------+
|
| Run +-------------+ Preset 3
|--| |----| 4 < WS < 10 |------( )
| +-------------+
|
| Run +-------------+ Preset 2
|--| |----| 9 < WS < 15 |------( )
| +-------------+
|
| Run +---------+ Preset 1
|--| |----| WS > 14 |----------( )
| +---------+
|

Where WS is the register containing the wind speed value

If your presets are selected by a binary combination of 2 digital outputs then just modify the code accordingly.
 
Last edited:
Sorry, I should have been more clear in what I am using this for.

The PLC controls a fountain. The nozzles are on a pump that is powered by a drive. Every 30 seconds a new preset on the drive is selected by the sequencer in the PLC program. There are 3 separate drives controlling 3 pumps so they can all be on a different preset on their individual drive, all run from the same sequencer.

My problem is I can't figure out how to switch to a lower preset if a higher one should be off based on wind.

Thanks for your help again. I greatly appreciate it.
 
Post what code you have so far. This way you help us help you. If you don't have any code yet give it a try and post what you come up with. Be sure to document everything well. Good luck
 
Hello everyone,
I inherited programming Horner PLC's after a month of training from the previous guy at my work. I have mostly taught myself and have run into a problem I can't seem to figure out how to code.

Basically I have a wind head that measures wind speed. I have 3 stages set. At stage 1 wind(5-9 mph) I want a drive I am controlling to not be able to go to it's max (4th preset) output. At stage 2 wind speed(10-14 mph) I don't want the drive to be able to output it's max or upper medium (4th and 3rd) preset. And at stage 3 wind (15mph and higher) I want the drive to not be able to output anything but the lowest setting.

The thing that stumps me is, I am selecting the drive output (1,2,3, or 4) with a sequencer in the program, if the wind speed will not allow the 4th preset to run, I want to go to the 3rd preset without the drive staying off for the duration of the 4th speed being selected in the sequencer and so on with each change in wind speed.

Can anyone understand what I just typed and my question? Or do I need to try and explain it any better?

Thanks for any help yall can give.

And welcome to the forum
 
You do not need a sequencer.
The code can be kept simple.
I am away and don't have cScape installed.
If you have anything done so far, just post it on here.

The sample code posted above with the "Compares" will be the easiest way to implement the above and can be easily understood by someone else who may end up supporting your code/app.

Basically:
IF "Scaled analog Input" (this can be a register %R) LESS_OR_EQUAL to "insert constant here" AND_NOT GREATER_THAN "Insert constant here" THEN "Condition_1" = TRUE
In cScape use 2 compares in series as shown above then set the bit.
Repeat a few times (or as many as conditions you have).

Deal with the bits representing conditions above to do what you need to do.
I would also do what's shown above while dealing with bits.
IF "Perms" AND "Condition_1" THEN "run_speed_1"=TRUE
IF "Perms" AND "Condition_2" THEN "run_speed_2"=TRUE

Hope this doesn't make it even more complicated for you.
 

Similar Topics

Hey new user here need help programming a horner plc using cscape. I am trying get in the counts but max out after 64000 or 32000 counts how can I...
Replies
2
Views
2,785
I am having problems with my code working all the time as it should. Sometimes the feature will not run. I need it to be able to run all the time...
Replies
2
Views
1,881
I am doing stepper motor using horner plc . i want to know how to use timers and it addressing in cscape software also how to use the output timer...
Replies
7
Views
9,746
Hello All, I am stumped on how to convert a %MW to a %MF using Machine Expert Basic and a Modicon M221. The help files show a word to a double...
Replies
4
Views
153
Hi, I am trying to set up a plc. I've never done any programming with ladder logic previously. I'm trying to set up a a program to turn a device...
Replies
7
Views
255
Back
Top Bottom