Jump to content

Recommended Posts

Hello All,

 

I just got a new PLC so I could continue my development of the application. I am getting there slowly but surely, still learning a lot..

There is one issue I cannot fix. The issue is that I use a MI to store the converted value of a 4 - 20mA pressure transmitter, and display this at two different HMI displays. On one HMI display, "Manual", it shows the correct value, while on the other HMI display it consistently shows 0.01. The strange thing is that the bar graph right above the 0.01, which is using the same MI, shows the correct indication...

I have tried changing the sizes of the indication, till like 3x required size, removed it, and re-inserted it, but no luck. What am I missing here?

 

I have attached the project files, and some screenshots of the configuration of all the elements. The conversion is done at ladder rung 1 in the main routine, and in online mode I can see that it all works as expected. (As can be proven by the right indications)

 

Thanks in advance for your time...

 

Paul

 

Config:

Analog input config.PNG

Conversion:

Ladder rung with conversion.PNG

Working indication:

Pressure working.PNG

Working graph bar:

Pressure bar graph working.PNG

NOT working indication:

Pressure not working.PNG

Starting Air Compressor Control Panel - v0.51.vlp

Online checks.

Correct (working):

remote access manual - working.PNG

Not correct (not working):

remote access overview - not working.PNG

Edited by PaulZ
Put some headers above images

Share this post


Link to post
Share on other sites

Program tested on V1040 - the same issue present.  STORE to another MI make correct variable indication.

But why original prog do not work??? 

I try to use original prog and delete trend - indication is correct.

I use another stored MI in trend and  indication is correct also.

Share this post


Link to post
Share on other sites
38 minutes ago, kratmel said:

Please try to store MI3 to another one and place it as MI to display  on not correct screen.

That works... 🙂

But why? What is the "difference"? Is it a bug...?

Share this post


Link to post
Share on other sites
1 hour ago, kratmel said:

Program tested on V1040 - the same issue present.  STORE to another MI make correct variable indication.

But why original prog do not work??? 

I try to use original prog and delete trend - indication is correct.

I use another stored MI in trend and  indication is correct also.

I see that my reply is below yours. I didn't see this answer before. I am happy to find out it isn't just me who is confused.. haha 

I can live with the solution of using another MI, but it is strange.  

Now off to getting the trends to work, and then I'm done! 

Thanks Kratmel!

Share this post


Link to post
Share on other sites

Hi Paul, in quickly looking at your program there are a few standout things that I would be doing very differently.

1).  As Flex  is fond of saying...."Unitronics don't charge for ladder rungs".  You have way too much happening in a lot of rungs.  eg  Main routine 7.  Sometimes things don't work as you would expect with too many things bundled into the same rung, due to the way things happen internally.  It might work, but it is often way easier to troubleshoot later if things are broken down into separate areas.  There is nothing wrong with using an MB as a "sub-controlling" bit to do the same trigger over and over in progressive rungs to prevent trying to do it all in one.

2).  MRoutine rung 15  why use set and reset on actual outputs?  Set and reset can lead to all sorts of issues.  Much better to have them as power up as "none" and normal controls make them on or off.  If you really need things to boot to a certain setting, in the Output list you can see a "power plug" and you can choose what state you want things to boot to, None, Set, Reset, but remember that immediately anything else in the program tells the output to do the opposite action it will occur.  Edit:   use -(  )- as the coil.

3).  Without a deeper look, it is possible that your way of using MBs linked to displays is causing issues.  I always try to use the ON state of such an MB as the trigger for any ladderwork, and said ladderwork is often in a subroutine that is only run when the screen is active.  Your method of using -[ / ]- to say a display is not on might be the reason for the hiccouph.

Once you get more used to programming, you inevitably come back to something you first did and go "why in the world did I do it that way?!!"  But keeping on at things and learning all the time is part of the process.  As you are doing.

cheers, Aus

Share this post


Link to post
Share on other sites

Excellent response from Ausman. I'll add one more thing in the interest of good programming practice - do NOT have conditional subroutine calls. In rung 16 of the Main Routine, the direct contact of MB 4 is totally unnecessary. There's nothing wrong with separating out your button check into a separate subroutine if you wish, but there's no reason to only call it when that screen is displayed. Same with rung 17, and also in rung 18. Rung 18 isn't a conditional subroutine call, but MB 6 is totally unnecessary. If you want all that stuff in one ladder rung, then replace MB 6 with SB 1.

Regarding the incorrect display of MI 3. That is only occurring when you have the Trend graph displayed. And it's not being displayed incorrectly - MI 3 is being overwritten by the value "1" when the Trend is on screen. I don't have time to go through your Trend graph setup in detail, but look there for your problem. Perhaps delete it and re-create it if you can't find the issue.

Share this post


Link to post
Share on other sites
36 minutes ago, Flex727 said:

Excellent response from Ausman. I'll add one more thing in the interest of good programming practice - do NOT have conditional subroutine calls. In rung 16 of the Main Routine, the direct contact of MB 4 is totally unnecessary. There's nothing wrong with separating out your button check into a separate subroutine if you wish, but there's no reason to only call it when that screen is displayed. Same with rung 17, and also in rung 18. Rung 18 isn't a conditional subroutine call, but MB 6 is totally unnecessary. If you want all that stuff in one ladder rung, then replace MB 6 with SB 1.

Hi Flex,

 

Thanks for the hints. I am editing the ladder at the moment using these hints 🙂 . As I said before, it is a (steep) learning curve, and slowly but surely I am getting there...

37 minutes ago, Flex727 said:

Regarding the incorrect display of MI 3. That is only occurring when you have the Trend graph displayed. And it's not being displayed incorrectly - MI 3 is being overwritten by the value "1" when the Trend is on screen.

I see where I went wrong... When I initially put the HMI together I did not have the PLC yet to try things out yet. I see that in the "Link" I indeed used MI 3... I think I assumed that was the value to be displayed. And now I know better, but it never dawned on me to check that config...  

Thanks again for your time

 

Paul

Share this post


Link to post
Share on other sites

I wish I had a model of each type of Vision so that I could load up people's programs to check them "in the flesh", as issues are always easier to find.  But sadly I don't, and never will unless Unitronics does some donations to everyone who needs them on the forum!  And sometimes I can't spend a heap of time going through the program in Visi to find a hiccouph!  One of the hardest things in the world is going through someone else's program to find a fault.  We all do things differently!

Good call Flex, and keep at it, Paul.

cheers, Aus

Share this post


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.

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