Increment Increase/Decrease Voltage Output

moregan0

Member
Join Date
Jun 2018
Location
Bellingham, WA
Posts
7
Hi all,


First time poster here. I have a challenge to figure out in order to earn an internship position with a sensor company:


I am to write some plc logic to incrementally increase an output voltage from 0 to 5 volts in 0.1V increments, and then decrease by 0.1 V from 5V back to 0V, 100 times before cycle reset.


I have an idea to use counters for each cycle and timers to space the incremental increases/decreases, however I am lacking knowledge on the necessary analog programming commands to have the voltages rise and fall by the desired amounts of 0.1V.


I am still a beginner at this (two quarters at technical college in PLC systems and HMIs).


Here's what I have so far:


T:4/0 - T4/10, 0.25 second intervals for each increment, 0 to 5V.
T:4/11 - T:4/20, 0.25 second intervals for each decrement, 5 to 0V. (each timer's done bit activates the rung of the next timer in a cascading sequence)
T:4/20/DN activates C:5/0 (counting to 100)
C:5/0/DN activates the reset.


What kind of command do I need to use in conjunction with each timer (T:4/0 - T:4/20) in order to charge an output for a specified voltage value?


Any direction helps! Thanks :D
 
Last edited:
I an not familiar with Direct Soft programming, but you would need to use something like a move instruction put a value into the analog output card's register.

Do you have the analog card?

Alan
 
I haven't used that software either, so can't help you with the analog side of it, but consider doing this with one timer and no counters.


Each time the timer completes it would perform some math to work out the next voltage level, and if required increment the cycle count, then reset itself and go again.


Just a tip - that approach is likely to put you in far better stead than using 20 timers :)
 
As the others have suggested it will take a 'move' type command. In DirectSoft this would be the combination of an LD (load) command followed by an OUT command. The load can have a constant as its parameter or the address of a register which holds a number. The out parameter would be the address of the selected channel on the output card.


You will have to read the documentation for the supplied analog output card for more details. You may have to include a series of setup commands at the beginning of the program. If the target CPU supports the IBox instructions, and you are allowed to use them for this test, the the setup may be very simplified and reduced to a single command.


Good luck.
 
Thank you all for the quick and informative responses!

I will request some more info from the company about the analog card they are using, and do subsequent research on move commands and the LD one mentioned above. I will also try to simplify it down to using just one timer, and get back to you.

Thanks for the help so far! Eye on the prize 💪
 
Handle your analog references in the PLC as real units, and only scale them as you actually pass them off to the analog output module.


If you want 0 to 5 VDC, use a real number, and just increment it/decrement it by 0.1 each time.


When you actually pass that number to the analog output, scale it there to whatever the analog output expects. If the output is looking for say 32000 for 10 VDC, scale your internal EU register like:


(My_EU_Value / 10.0) * 32000
 
I am not familiar with the platform but with my normal platform i would work out what 0.1 of a volt equals with respect to the analogue output. E.g. if the analogue output value is 10000 = 5 volts then it is easy. I would use a timer to operate an add instruction on a rising edge trigger. Similarly subtract on the way down. Add 200 each time straight into the output channel. You would also need a throttle at say > 9990 on the way up and < 50 on the way down. When = 10000 or 0 reverse direction.
 
Some more relevant info

Good morning all,

I am working on implementing your solutions into the ladder logic, and hit one more snag. The analog card the employer is using is the 4-20mA card (F0-4AD2DA1), and not the variable voltage one. Without adding some kind of voltage regulator, is it possible in the programming itself to use math functions to trick the PLC into outputting the right current to get the voltage we want?
Of course this depends on the resistance of the load. I have included pictures of their setup. They only have one pressure transducer inline with the output, and I have asked for the resistance of this load hoping that I can make it work with that information. If it's a variable resistance load, however, I assume I'm going to need a voltage regulator in line with it.

Thanks again for all your help! I'm learning a lot already and am getting really excited about this! 😁
 
I don't believe you will get a 0-10 vdc out of a 4-20mA Card I don't work with Automation Direct much The AB cards I use are selectable 0-10 vdc or 4-20mA Output
Your program would be the same (except for maybe the scaling factor)
 
I don't believe you will get a 0-10 vdc out of a 4-20mA Card I don't work with Automation Direct much The AB cards I use are selectable 0-10 vdc or 4-20mA Output
Your program would be the same (except for maybe the scaling factor)

This is what I was afraid of. I think they will need to purchase the -5-5V/0-5V/0-10V card to get this done :oops:
 

Similar Topics

Hi, Am I being daft (again)? I want to increment a tag (Integer) by 1 each time a button on the HMI is pressed. Before the button press, the...
Replies
22
Views
2,205
Hi, I have a stand alone inspection unit with no PLC but I can send 24v input signals to the machine PLC to show a good read and a bad read when...
Replies
9
Views
753
I have a bender table that I am automating. I have added a Kinco HMI and PLC, I am also using an Omron encoder sensing the rotation of the table...
Replies
49
Views
9,231
The attached pdf shows a CPT instruction that should calculate the value of tag Cell_Charge_Percent_Remaining[1]. I've included the relevant...
Replies
4
Views
1,496
I have a considerable amount of modbus register data tags from a plc already setup in crimson. I have them setup in alphabetical order with...
Replies
4
Views
2,087
Back
Top Bottom