Please help

In CCW you might end up using a UDFB (User Defined Funftion Block) called dint_to_time. I’ve seen it in sample code somewhere. So far I have only found time_to_dint.

Your code might look like HMI_Time (DINT type) to the seconds input of the UDFB and time out of the UDFB would be Preset_Time (TIME type). Use the Preset_Time tag for the timer preset.

Edit - It might be any_to_time

Another edit - Any_to_time is a built in function, not a UDFB. It’s one of the conversion instructions.
 
Last edited:
Thanks everybody for all the input!
I will get back on it probably tomorrow, I was supposed to have a class on this but due to the Covid thing it got cancelled.

but I WILL get it!
Thanks again!
 
Not familiar latest RW kit but in other PLC's IEC timers work differently for example T#5s is a 5 second timer, and if a variable is placed as the timer value then the variable needs 5000 ms although the timer is 100ms time base. two ways to get the correct value scale the variable in the HMI (assuming it has scaling) or use a function integer to time I have done both. I suppose it will depend on the type of PLC.
 
I made a test tonight in LAD and ST. For each a HMI indicator blinks at a HMI entered rate. ANY_TO_TIME converts the digits to milliseconds. Anything after the decimal in a REAL is ignored. I didn’t think of testing a negative to see what happens while I had the controller out.

HMI_EnteredSeconds1 is global REAL
Preset1mS is a local REAL for the intermediate step because I wanted seconds with decimals on the HMI
Notice 1000 needs .0 to be REAL to match the other instruction parameters
Preset1 is local TIME

The rest of the code is logic to toggle the indicator.
It’s not exactly what you’re doing but might help get you there.

PresetLad.JPG PresetST.JPG
 
Last edited:

Similar Topics

Hello, I am trying to get a Yokogawa Hart pressure Transmitter and a Rosemount Temp Transmitter to read on a 1769-IF4 module on an L33ERM...
Replies
10
Views
375
Please help me, I have solve many week but still not solve it. I found trouble of factory talk studio when I set tag by browse address of OPC...
Replies
0
Views
117
Hello Everyone, i Have im my Industry a Endress & Hauser Promag400 this has a screen that constantly have that error, it says to wait, somebody...
Replies
2
Views
473
After replacing the 70 with the 525, the PLC can read from the drive and recognizes it as online, but no commands are being listened to. PLC is...
Replies
1
Views
551
Back
Top Bottom