Jump to content

How to prevent several display jumps with the same condition on V130


Recommended Posts

Hello everyone,

I'm new to this forum, and to Unitronics products in general, so I'm sorry if my question is too basic. The question is about navigating through displays on a V130.

I'll describe my problem with an example, since the application I'm working on is far more complex than what I need to show you.

Let's suppose I have an application with three displays (namely Disp1, Disp2 and Disp3). There is a jump condition on Disp1 and Disp2 which jumps to the next display when I press F1 on the keyboard. I.e., if I'm showing Disp1 and press F1, then it jumps to Disp2; on the other hand, if I'm showing Disp2 and press F1, it jumps to Disp3.

The thing is that when I'm showing Disp1 and press F1, it jumps directly to Disp3 (which I think it happens because when it loads Disp2, as F1 is pressed, it jumps again to Disp3).

How can I prevent this? I've tried several approaches and none of those worked. I've tried both creating some logic in my app which triggers a Load Display block, and using the Jump Condition table on the Link&Jumps tab of the display editor.

Some background about me... I'm new to Unitronics products, but I've worked with other PLC brands, and I have extensive background in programming and embedded electronics.

Thank you very much.

Juan.-

 

Link to comment
Share on other sites

  • MVP 2023

I almost never use the Jump Condition Table for display navigation because in complex projects I will invariably end up adding a screen navigation button to a display and forget to add the corresponding jump condition. I have a subroutine where I handle every HMI screen jump in ladder so that I can repeat navigation button addresses without needing to add jump conditions.

With external keys it can be a bit more complicated. In that situation I will have an "Is Displayed" operand for each screen and use a direct contact of that bit along with a positive transition of the function key to navigate to the correct screen. Try that and see if it fixes your problem.

Link to comment
Share on other sites

Hi Juan

What you have done is probably ok. but just check that you are using a positive transition contact of F1 and not just a normal contact.

A normal contact will switch several times during the scan time of the PLC whereas the positive transition will pulse once each time it is pressed.

Regards

Denis

 

Link to comment
Share on other sites

Hi Flex

This is strange. If he is using the jump condition on the displays then they are already positive transition contacts.

If you look at Visilogic where it says jump condition, the symbol for positive condition is shown.

I assume that it is done this way to prevent this from happening.

A look at the program would help.

Link to comment
Share on other sites

Thanks to everyone for your replies. Sadly, the machine is at the client's factory, and I won't be able to test anything until Friday.

19 hours ago, sgull said:

What you have done is probably ok. but just check that you are using a positive transition contact of F1 and not just a normal contact.

@sgull, I had that in mind, but I'll double check if I didn't left any normal contact behind.

23 hours ago, Flex727 said:

With external keys it can be a bit more complicated. In that situation I will have an "Is Displayed" operand for each screen and use a direct contact of that bit along with a positive transition of the function key to navigate to the correct screen. Try that and see if it fixes your problem.

I tried using an "Is Displayed" operand and it worked in some displays, but in others it didn't. I really can't find out the reasons why I'm having this sporadic behavior.

One question, are the display jumps processed after the plc cycle is finished? I found last week a topic in this forum in which someone posted the order in which everything is processed in a plc cycle, but I can't manage to find it again.

Thanks everyone again.

Juan

Link to comment
Share on other sites

  • MVP 2023
3 minutes ago, JuanArg said:

One question, are the display jumps processed after the plc cycle is finished?

Yes. Here is the comment you were looking for (credit @cantcliff): http://forum.unitronics.com/topic/3579-some-noob-questions/?tab=comments#comment-12994

  • Read physical inputs and map to memory
  • Run the ladder logic.  Scans left to right, top to bottom. 
  • Write physical outputs
  • Updates HMI
  • Communications
Link to comment
Share on other sites

Yes...that was it!

1 minute ago, Flex727 said:
  • Read physical inputs and map to memory
  • Run the ladder logic.  Scans left to right, top to bottom. 
  • Write physical outputs
  • Updates HMI
  • Communications

Since "updates HMI" is almost last in the list, it's safe to assume that the "while displaying" subroutine of a display that is loaded on a given  cycle, will be active for the first time in the next one. Is that right?

I ask because I use those subroutines to put the logic that manages the jumps. And I want to fully understand how everything works.

Link to comment
Share on other sites

  • MVP 2023

Personally, I'm not certain of the order of events when you get into that much detail. I think it takes several cycles to get an HMI screen fully displayed, so not sure when the "Is Displayed" bit turns on or off. However, a positive transition of the button press should only be on for one PLC cycle so it shouldn't matter. Maybe the button is bouncing a bit? Try putting a timer on the button press so that it can't activate again for a tenth of a sec or so.

Link to comment
Share on other sites

Juan

As Flex says the positive transition should only be for one cycle.

As the name suggests it activates when the bit goes from low to high.

You should be able to keep your finger on the button indefinitely and it should not activate a second  time as now it is a closed contact regardless of the number of scans or the scan order.

Check for other instances of F1 in your program in case you have a normal contact instead of a positive transition or in case you have a reset coil somewhere on F1.

 

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