Jump to content

Comparing RTC with Value from HMI &


Recommended Posts

Hello, i am realy new in programming so hopefully someone can help me.

The Problem is as follows:

I have a mixer-motor that should run about 30 times a day

The user should have 30 HMI-Screens, where he can change:

time: hh:mm

mixer: on/off (is this possible with a bit-value ?)

feeder: on/off (is this possible with a bit-value ?)

second mixer on/off (is this possible with a bit-value ?)

If the "mixer" is off, nothing happens (so it is possible to chosse from 1 to 30 different Times of switching on the mixer-motor)

The mixing time should be variabel but i want to set it global, in order to change one one Timer and not 30 direct clocks

(30 direct clocks would be an option, but not as convenient as i would like it)

how can i save the preset counter value into a MI,

compare it with the RTC (SI30)

and

set a MB ?

next point:

is it possible to cange only a MB with a HMI entry?

If not, how can i simply change a MI (0 or 1) to a MB?

It would be nice if somebody could help me with this issue.

thanks

greetings

BlindeMan

Link to comment
Share on other sites

Welcome to the forum!

To start with, it would help greatly to state the part number and model of the unit you are using.

There are features that vary from one to the next.

Rather than do this with 30 screens, you may want to seriously consider utilizing indirect addressing and only building a couple screens.

It would be a lot less work, and also a lot less code overall.

You should also consider, instead of using indivdual timers, to either just base it off of the clock and comparators, or base it off of one timer and comparators.

This also would cut down on the code.

Yes, you can enter integers on the screen.

You need to create variable links under HMI>Variables, to associate a variable number with a memory area.

You can then "right click" on the screen view and hit attach variable.

When you create your variables, you define what that variable is under Variable type. (You can make it a BIT, or Integer, or Date,Time, etc)

Link to comment
Share on other sites

Hello, i made my comments in Blue:

First, thank you for the answer.

Welcome to the forum!

To start with, it would help greatly to state the part number and model of the unit you are using.

I use a JZ10-11-T40 (SN:LG13F1EL4)

There are features that vary from one to the next.

Rather than do this with 30 screens, you may want to seriously consider utilizing indirect addressing and only building a couple screens.

It should pe possible for the worker to change every Time separatly. -- is there any example where i can get a glimpse of your idea?

As i see this i need 30 Screens for the 30 times (out of every sceen i get 30 Times --format: 12:34, so 12 would be the MI-hour and 34 would be the MI-minute,

than i would get the system time make a mask to get out only the hours and compare it with my 30 MI-hour entrys, same procedure with the minutes.

I did yet not finde how the system time lookes like ( i mean , it is shown in this format HHMM -- that is clear).

I want to make my entry with a collon, thats why i have 30-MI minute and 30-MI hours.

It would be a lot less work, and also a lot less code overall.

Thats true -- but as long as i have no idea of how to work with indirect addressing -- i must make it like this.

Is there any sample - projekt where i can finde out how this works?

You should also consider, instead of using indivdual timers, to either just base it off of the clock and comparators, or base it off of one timer and comparators.

That is my plan, i want to compare the RTC with the MI's where i saved the entered times. --- but i do not know how to solve this problem in real programming.

if the result is true, i will switch on my mixer for a defined time.

Timers always offer an ON and OFF time -- i do not want this.

This also would cut down on the code.

clear

Yes, you can enter integers on the screen.

My question was if it is possible to change a MB direct -- cause if i choose MB i can only display this Bit but not write into this MB.

You need to create variable links under HMI>Variables, to associate a variable number with a memory area.

So i must make a Variable as MI (Limit: 1) than mask out the last Bit and compare it with #1 and than save this result in a MB.

Than i combine this MB with my MB-Mixer-ON with a &-Funktion.

I can only use Integers in a compare-Funktion and only Bits in a &-Funktion.

You can then "right click" on the screen view and hit attach variable.

no problem

When you create your variables, you define what that variable is under Variable type. (You can make it a BIT, or Integer, or Date,Time, etc)

no problem

Link to comment
Share on other sites

"Thats true -- but as long as i have no idea of how to work with indirect addressing -- i must make it like this."

The amount of time you would spend doing it long hand will easily exceed learning how to use indirect addressing.

With the 64 HMI variable limit, I don't see that you have any choice either.

Instead of having 30 screens, you only need 1.

You will have one set of variables as "buffers" for your data.

These are the ones you will view on your one screen.

You will have another variable as the index.

Therefore, instead of Screen # 15, you will instead have index 15 as a selection.

Allow them to scroll the index on the screen. Everytime the index changes, it loads the values from the MI table into the buffer.

Everytime they change a a value in the buffer, it then copies those values into the MI table.

You have 256 MIs to work with. That should be enough.

You are better off not using "timers", just base everything off the clock.

Read the HELP on the Store Indirect MI function.

Read the HELP on the Indirect Clock Functions.

Unfortunately the U90 does ont appear to allow you to do Indirect bit addressing. Maybe someone else here can correct me if I am wrong. Either way, I don't think you need to.

The instruction set for U90 is very limited. If this is just a one-up job I would highly recommend bumping up to a vision series controller. The amount of time it will save you in coding will be large. Then you have access to data tables and much more advanced features to save you time.

"My question was if it is possible to change a MB direct -- cause if i choose MB i can only display this Bit but not write into this MB."

Yes, The same way you did the MIs.

That is my plan, i want to compare the RTC with the MI's where i saved the entered times. --- but i do not know how to solve this problem in real programming.

if the result is true, i will switch on my mixer for a defined time"

You will just have to experiment with the Comparators to get a feel for how they operate.

You have a Start time and a Duration. You will have to have one comparator go true for the on time and go false for the off time.

You will have to calculate the off time as OFF TIME = START TIME + DURATION

"So i must make a Variable as MI (Limit: 1) than mask out the last Bit and compare it with #1 and than save this result in a MB.

Than i combine this MB with my MB-Mixer-ON with a &-Funktion.

I can only use Integers in a compare-Funktion and only Bits in a &-Funktion"

Not really following you here. I don't see why this would be necessary.

Good Luck,

Link to comment
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.

Guest
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...