how to generate 20-4 ma signal in AB SLC

ranaaffan

Member
Join Date
Mar 2013
Location
pakistan
Posts
6
hi..I need help to design a ladder logic that will generate 20 to 4 ma signal in 7.7min (462 sec). the output signal should be decreasing with same rate.
 
Let's assume 20ma=32767 and 4ma=6553. There are 26,214 "points" between the min and max. it you need the current output to decrease from 20mA to 4mA over 7.7 minutes (462 seconds), just subtract 56.74 "points" from the output every second, or 5.674 every tenth of a second
 
Last edited:
Use a free timer ticking every 1 second, use counter (462 for acc max), then every tick of timer counter goes up, use an array (462 places) each place is a value from 20 to 4 mA as rguimond explained.
Use counter as index to move value from array to analog output.
 
scale 462-0 :: 20-4ma

If you want to go from 20-4, start at 462 and subtract 1 each second till it hits 0. Reverse and use an add instead for the other direction.
 
I dislike the idea of having to keep subtracting, as it can be prone to getting out of synch.

I would use a timer set to 0.1sec timebase, with a preset of 4620.

It is simple math then to give the correct RAW output to the analog output card

RawOutput = ((RawMax-RawMin)/TimerPreset)*(TimerPreset-TimerAccumulator)+RawMin

If you are using any of the SLC's or a Micro 1400, you can place this equation in a CPT instruction, otherwise you will have to daisy-chain the conventional maths instructions.

And if you use a RTO instead of a TON, you can "pause" the ramp at any time. If you keep repeatedly pausing your ramp when it uses a TON, you will lose time every time the timer gets disabled, because it will reset.

EDIT: Whoops, I'd forgotten the SLC doesn't have a 0.1 sec timebase, so the best you'll do is 1 sec timebase with a preset of 462
 
Last edited:
Last edited:

Similar Topics

Hello Friends, I am looking for a way to take my PID Output( it is the result of my PI Algorithm in Real format) and generate a PWM Signal in...
Replies
16
Views
2,328
Hey, i need help to write a structured text program that set a signal to high 6s and to low 6s. I used TONR to do this but it doesn't work...
Replies
5
Views
4,350
Does anyone know a way to dynamically generate a 2D barcode on a PanelView screen? An Activex Control maybe? If such a method is out there, it...
Replies
14
Views
2,942
Hi, I am trying to generate source file of OB1 including all dependent blocks. But i am getting a message which says-->>one or more blocks...
Replies
3
Views
1,231
Hello Everyone, I would like to know where to start when designing a HMI+PLC Allen Bradley based, that complies with CFR 21 PART 11, ALCOA...
Replies
4
Views
2,872
Back
Top Bottom