Prizm_Controls

Unity Pro TIME_TO_INT FFB

3 posts in this topic

So i have a bit of a dilemma and am feeling rather confused. I have a TIME_TO_INT FFB. The input to the FFB is t#2m and the output of the block is -11072. This value is being divided by 1000 and presented to the HMI. HMI's goal is to be showing a number represented in seconds. This is existing logic and obviously there is issues with it. Can anyone help and shed some light? How to intepret the output of the TIME_TO_INT block? Thanks all.

Share this post


Link to post
Share on other sites

Actually, the output is probably an UNSIGNED number.  Not sure how Unity does it, but I have used similar commands on other PLCs and its output is typically a number of milliseconds or nanoseconds.  Hence the divide by 1000.

Share this post


Link to post
Share on other sites

Thanks for the input. Figured it out. Output from the TIME_TO_INT is in milliseconds. The -11072 was displayed as an INT. I changed the output tag to be defined as a TIME data type as well. I ended up dividing it by 1000 before converting it to an Integer in Structured Text. HMI is happy as a clam and it works well. Thanks all for the quick response, its greatly appreciated!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now