Jump to content

Num to Ascii UDBF problem


Marko

Recommended Posts

Hello,
I'm new to Unistream so forgive me if I misunderstood something simple (I use latest UL version and latest firmware on PLC).

I wanted to convert number in string and found out that UniLogic doesn't have Num to ascii function. Not happy, but OK, I found UDFB in samples library and set it up according to my needs. Then I encountered problem : I want to set output string to be 4 characters long, show  +/- sign and pad zeroes to fit 4-char format ('+007' for example) UDFB works fine until I switch PLC off and then ON again.

I noticed that in my ladder progrem UniLogic CHANGES UDFB format (padding)  selection from 2 (pad with zeroes) to 1 (pad with spaces) I cant figure out why UniLogic changes UDFB  input parameter by itself???  Even stranger is that downloaded program "works" until power off.

After power On PLC start to pad "spaces" instead "zeroes" and when I open Unilogic program there is also format in UDFB set back to "1" -pad with spaces. attached pic. UDFB input parameter D should be "#2" for my needs but somehow it comes back to "#1'

 

Thanks for help, Regards,
Marko Kocijan

Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.