CX Programmer FB Timer

Nortech

Member
Join Date
Mar 2018
Location
Spain
Posts
59
Hi All,
I want to allow an operator to enter two numeric value to an NB HMI (Perhaps to D0 for example). I would like the first value to be a time interval (in seconds) for which an output should be off. The second value will be the time in seconds that the output would be on.

I've tried simply assigning a timer preset to D0 in ladder but the timer goes into error when anything above 9 is entered.

Id ideally like to do this as a function block in ST but not sure how.

Can anyone help me out?

Thanks

See image attached of my ladder

Capture.PNG
 
The only thing I'm aware of is that the timer value is BCD format & I believe it takes two words i.e. D20, D21. I's many years since I used it and did not use variables in timers so it is a bit of a guess try converting a value to BCD.
 
You can use the TIMX instruction if you want a UINT as the data type for the Set value.

Thanks, IÂ’ll give this a go. The main thing I want to do is to have the operate enter the time value in seconds or minute rather than 100ms. Therefore, I need to manipulate the value that they type in.

IÂ’ve tried it with counters (P_1s bit increments a counter and the preset of the counter is a variable from the HMI.)

This works from 1-9 but if I type in anything greater than 9 the counter goes into error.

Things like this seem a lot easier with Allen Bradley or even Sysmac....
 

Similar Topics

I wanted to use a retentive timer where I can read the accumulated time in the time(i.e. the PV of the timer). I the case of allen B we use...
Replies
3
Views
2,857
Hello everybody, I have a question about the BCD timer in CX programmer. In my program, when the timer starts to count and reaches 0, it doesn...
Replies
15
Views
3,228
Hello everybody, I am trying to make 3 types of timers in CX programmer which's value can be set on an NB panel. The first type uses seconds, I...
Replies
5
Views
3,530
newbie here. I have written and worked with a few AB programs in both RS500 and 5k, in a very limited fashion over the last 10 years. I'm a...
Replies
4
Views
5,657
Hello everybody, I am new at the forum, so pardon me if I ask a wrong question 🤞🏻 I have a CP1E NA20DT1T and I am trying to figure out, how...
Replies
11
Views
4,140
Back
Top Bottom