Help twido program

pedroborges

Member
Join Date
Aug 2022
Location
Portugal
Posts
17
Good, how do I control through an Analog output of a valve, that is, open the valve from 10% to 10% until it reaches 100%, and then close it decreasing from 10% to 10% until it reaches zero in a twido automaton ?
 
Here is an example of a way to increment or decrement an analogue value by 10%, we start off with a reciprocating timer i.e. NOT timer contact runs the timer & When the timer is up it produces a pulse, which on next scan resets the timer, i.e. a one shot every second (this could be any time you want).
If the increment command bit is on then providing the scaled analogue value is less than 100.0 (%) then it will increment every 1 second.
The next rung does the reverse i.e. decrements by 10%.
Then we upscale the 0-100% by multipying it by a factor i.e. 20.47 for 0-2047 to get the raw value, then we convert it to an integer 0-2047 to output to the analogue channel.
If you wanted 10-100% then the lower limit compare would be set at 10 & not 0, the same goes for the upper limit, the reason for doing the increments in floating point maths is because using pure integers would result in a raw output that would not be 0-2047 but could be -13 to +2087 for example so to keep it accurate floating point maths is used, also scaling the manipulated output means it is easier readable to reflect the type of position for example 0-100% or 0-200 litres flowrate etc.
Not in your required PLC type but will give you an idea just need to convert it into the Twido type instructions.

Inc_Dec Analogue.png
 
url]



Would this work to open the valve?

I have schedules to open the valve.

in this case if the mf1126 is 1 open the valve
 
I do not quite understand what you are trying to do, it looks like you want to increment every second but using a timer like that will increment it every scan for 1 second so if the scan time was 20ms the value would change by 50 every second, in my post, Increment bit is the one that needs to be true so that every second the analog output is incremented by 10%, the decrement bit does the opposite, you just need to create the ladder in twido, then when you want the valve to open turn on the Increment bit or when you want to close it turn on the decrement bit. in other words my variables you need to use %xx.xx
You will need to set your own limits i.e. when decrementing the compare on mine is 0, however, if you only want it to go to 10% then just compare for > 10, depending on the type of analogue card you have the maths will need to be changed so if the maximum output of the analogue is 1024 then it is 1024 divided by 100 = 10.24, for analogue cards that require 2047 then it is 20.47
for 4096 it is 40.96 to convert it from 0-100% to the max raw value.
Sorry I cannot be more help as I do not have modicon software.
 

Similar Topics

Hello, I am a newbie here. I work with industrial automation in my professional life and use some simple PLCs along with pneumatics for handling...
Replies
1
Views
1,635
I'm having problems with the loaded program on a TWIDO PLC, #TWDLCAE40DRF, the one with an ethernet port. The original one failed and I restored...
Replies
8
Views
5,199
Hi I am new to twido and am looking for some help on where to start with a project i have on. I am looking for a way to input a formula in to...
Replies
6
Views
4,518
Hy guys, Does anyone worked with Twido PLC (TWDLCAA24DRF or TWDLMDA20DTK) and aditional TMI2AMI4LT analog input module? I need help with these...
Replies
5
Views
4,240
Hello Schneider specialists I would like to know the best ethernet driver i should use to connect my twido to my XBGT4230 hmi using ethernet...
Replies
15
Views
8,587
Back
Top Bottom