Jump to content

Jazz JZ20-J-T40 - 2 problems (A/D and timers)

Recommended Posts


I´m working on my first program  with Unitronics and I have 2 problems:

1)  I need 12-bit A/D converter, but in U90ladder I don´t see description for SB95, so I don´t know if it is SB for enabling converter from 10 to 12-bit.

2) I my program I have many timers. Main function of my program is monitoring changes of timers and writing new values to MI variables (using  special functions in SI141) for compare to old value. In next parts of program I use timers for display and for timing parts of wash box (heating, pumps, solenoids etc.). But when I change value in any timer (I can see the change on display), it will not be overwritten in MI variable (over special function). For successfull change it need restart of PLC.

Please can you help me?


Link to post
Share on other sites

Hi Touny,

I haven't ever used the functions you are doing.  Comments/suggestions, which might be totally inaccurate as no actual experience on them.

1).  Even though nothing is "written" in U90 for SB95, in theory it should work if you simply still turn it on at power-up.

2).  Perhaps some crucial things you're missing with the timers is, and I quote from the manuals...

  • A change of Timer Preset value without changing the resolution will take effect when the timer restarts.

  • Changing the resolution of the timer's preset value does not affect the current resolution; it is therefore recommended that the resolution not be changed while the timer is active.

  • During Stop mode, timers continue to run.

So the question is are you letting the timers restart?  They may well be doing all this in the background and your observation of needing a reboot might be falsely identifying it as the error, when in fact it might be that the timers have actually been reset by the reboot.

You've chosen to try Unitronics at a basic entry level, U90 has some quirks that can be very annoying compared with ease of use in later models like Vision.  That said, it still has it's place....I still have old M90s banging away.  The one thing that I always found hard to deal with in U90 is how some functions rely on the re-use of certain operands throughout the progression of the scan, which seems contrary to logical thinking for what they are involved in.  Miss one of the progressive things you have to do with these, and it will mess things up good and proper.

cheers, Aus

Link to post
Share on other sites

Hello Ausman,

thanks for your reply.

For the first of my problems, OK I will try it.

For the second problem, attached part of my program for convert value in 19 timers to MI, but when I change any value in timers, result of convert is the same as old value.

MB89, MB90 and MB91 is flags for 3 subroutines, in MI19 is number of timer for convert. 

On next printscreen is routine for start settings of timers (in my menu setting I have 3 displays with settings of timers in subroutines, temperature for heating, minimum value of each timer for pause and change of password for menu settings), set of timers I make on display.

Please, how I can reset the timer after change of value?

I start every timer in subroutine, not in main routine, so the timers cannot active before I start its, or have I bad idea? 




Link to post
Share on other sites
13 hours ago, Touny said:

I start every timer in subroutine, not in main routine, so the timers cannot active before I start its, or have I bad idea? 

I can't look at this in detail right now, but as Flex is fond of saying, NEVER do conditional calls in subroutines.  Perhaps I misquote slightly.   Anyway...Flex.... where are you?!

Link to post
Share on other sites

In my Jazz application i use another idea to run time mesuring.

I use MI for set time (in sec or 0.1sec)  and copy it to another decremented MI. Then SB with 1s or 0.1s  blink used for dencrement this MI.

If decremented time MI  <= 0 - do something. At start of next cycle simple copy set MI to decremented MI.

Then my STATE MACHINE worked with timed cycle and do not use timers.   

Link to post
Share on other sites

Guys, thanks for your ideas, but the biggest problem was between chair and keyboard.

SB 95, is OK, but I had only 4 positions on display for 5 position number.

And my second problem was in settings of SI 141 (special function), because I read current value, but I did want preset value etc.

Now the program is running without problems.



Link to post
Share on other sites
14 hours ago, Ausman said:

Anyway...Flex.... where are you?!

Been visiting my daughter in the PNW (specifically Seattle area), but back now.

My advice to @Touny is to reduce the complexity of your ladder rungs. There is rarely any reason for more than a few elements in each rung. Breaking your code down to simpler rungs makes it much easier to read and troubleshoot. Yes, it creates more rungs, but as I also frequently say, Unitronics doesn't charge you by the rung. :)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...