FT View 8.0. Display in direct position.

Suseh

Member
Join Date
Apr 2015
Location
Rome
Posts
62
Hi Everybody.

First of all i want to say hello to everybody and thanks to all who are taking part in "life" in this forum. Many times i've found exact solutions or a piece of information which help me solve problem.

Anyway. Some time ago i start my adventure with FT. I must say that....FT is hmmm interesting but very often confusing.

Right now i am fighting with displaying a window in position X/Y.
For example i made a global object called "Motor" (i believe all of you put Motor/Valve/Tank object on your screen). My global object called "Motor" have 10 Global Object Parameters. This object shows only the most important status (for example status on/off). But when you click on it, the "new display" shows up with the details. My "new display" is a faceplate from my second global object called "Motor_details". So it is obvious that i run display "new display" with parameters from global object.
Standard procedure: Display new_display/T {#1}...{#10} and in this moment i want to display it in position in which the global object "Motor" is.

In my overview display i have 110motors, so i have 110 global object on it.
From euch of them you can run motor_details but it will be reason able to display motor_details in position X/Y where the motor is. I want to get X/Y position automaticly, of course. How can i do that? VBA?Macro?

Many thanks in advice for any help.
Kind Regards,
S.
i want to
 
Last edited:
If I understand you correctly, you want to position the motor popup relative to where you pressed on the screen. You need to use VBA to do this. I've done this for a few screens and it works well. You need to take care of things such as which side of the pressed object do you want to display the popup on, so it doesn't display the popup off the screen.
 
jkerekes your thinking is right.

I need more tips to do that.
For now i have questions:

1. I know that VBA scripts we can attach only to a display. How to trigger it from by button? As i sad before my button will be my global object "motor".

2. Let's say i did what is in point 1. And then what?
My VBA script run:
-> find X/Y position where "someone pressed something", and at the end
run command "display my_display_name/T {1}...{10}/X, Y position"?
 
Another proof that FT is confusing. The same application, which works fine over one week and suddenly something crashed.

I display my motor_details display with command:
Display motor_detalis/T{#1},{#2},{#3},{#4},{#5},{#6},{#7},{#8},{#9},{#10}
and suddenly it stops work. Display "motor_details" doesn't show on the
screen. I don't change any display settings.

So i change parameters to minimum, my new command:
Display motor_detalis/T{#1}
but still have problem. "motor_details" doesn't show on the
screen.

It show up only when i put:
Display motor_detalis



I'm fighting with this whole day and i don't find solution.
 
I can't edit my previous message, so:

Edit -> probably i spent too much time on this project.
I missed "space" between display_name and "/T". The proper command should looks:
Display motor_detalis[space]/T{#1}

But other thing has appear.
For example -> i made global object. Everything is "group" and has only 1 global parameter #1.
When i drag it or copy it into a new or existing display i don't have "Global Object Parameters Value" option visible.
It's greyed.

Any suggestions?
 
I can't edit my previous message, so:

Edit -> probably i spent too much time on this project.
I missed "space" between display_name and "/T". The proper command should looks:
Display motor_detalis[space]/T{#1}

But other thing has appear.
For example -> i made global object. Everything is "group" and has only 1 global parameter #1.
When i drag it or copy it into a new or existing display i don't have "Global Object Parameters Value" option visible.
It's greyed.

Any suggestions?

You do notice that you spelled 'motor_detalis' instead of 'motor_details' right ('li' instead of 'il' in detail). Several of your posts refer to 'motor_details'

When I have used Global Objects, when I copy them onto another screen, object parameters are missing or very limited. I just edit them on the Global Objects screen and re-copy them onto the target screen.
If you NEED to be able to change the parameters, then don't create the objects on the Global Objects thingee - just make a work screen that you never call and put your objects there, then copy them to your target screens.
 
You do notice that you spelled 'motor_detalis' instead of 'motor_details' right ('li' instead of 'il' in detail). Several of your posts refer to 'motor_details'

You're right! But it is only spelling mistake. "Motor_details" is the right display name.


When I have used Global Objects, when I copy them onto another screen, object parameters are missing or very limited

very limited?

When i develop my global graphic i must group/ungroup many times my global object. When you ungroup your global object the global object parameters are deleting. So, every time you must assign the same parameter (for example: #1, #2 and so on...). After that i copy it into display. Normally on that display you should have visible "global object parameter value" option.
Right now i can't see the solution and i must make again my global object.
I did it for 3 days....

Global Objects thingee
??


Any advice in my main questions?

1. I know that VBA scripts we can attach only to a display. How to trigger it from by button? As i sad before my button will be my global object "motor".

2. Let's say i did what is in point 1. And then what?
My VBA script run:
-> find X/Y position where "someone pressed something", and at the end
run command "display my_display_name/T {1}...{10}/X, Y position"?
 
Sorry, I confused parameters with properties (my mistake).

I have plenty of VB experience but I don't have VB within FT View, so I really can't help with your main question - sorry.
 
You need to add a VBA control to the button or object and from VBA you have access to all kinds of stuff.

I have a script at home I can send you in an hour or two it does what you want plus takes into account screen borders
 
sending you file vba code use on button

Dim NewX As Integer
Dim NewY As Integer



Private Sub Button1_Released()

NewX = Me.Left + Me.Button1.Left
NewY = Me.Top + Me.Button1.Top

Me.Application.ExecuteCommand ("Display Pop /X" & NewX & " /Y" & NewY & "")


End Sub


for pop to re-position itself if off screen
Private Sub Display_AnimationStart()

If ((Me.Top + Me.Height) > Me.Application.ViewportHeight) Then
Me.Top = Me.Application.ViewportHeight - Me.Height
End If

If ((Me.Left + Me.Width) > Me.Application.ViewportWidth) Then
Me.Left = Me.Application.ViewportWidth - Me.Width
End If

End Sub
 
forgot about global objects and vba issues

placing this on your popup

Private Sub Display_AnimationStart()

Me.Top = Application.LoadedDisplays.Item("Main").FindElement(Me.TagParameters.Item(1)).Top + Application.LoadedDisplays.Item("Main").Top
Me.Left = Application.LoadedDisplays.Item("Main").FindElement(Me.TagParameters.Item(1)).Left + Application.LoadedDisplays.Item("Main").Left

If ((Me.Top + Me.Height) > Me.Application.ViewportHeight) Then
Me.Top = Me.Application.ViewportHeight - Me.Height
End If

If ((Me.Left + Me.Width) > Me.Application.ViewportWidth) Then
Me.Left = Me.Application.ViewportWidth - Me.Width
End If

End Sub

add a param to pass your global object name in your case #11
change Me.TagParameters.Item(1) to Me.TagParameters.Item(11)

you can find this name by right clicking your object and going to "Property Panel" it should be the first item called name

And Change LoadedDisplays.Item("Main") to the Display name that has all your global objects on it.

Also

This is a more universal solution and requires less modification to your global objects
 
Last edited:
Thank you for tips.
I will play with VBA on Monday.

But other thing has appear.
For example -> i made global object. Everything is "group" and has only 1 global parameter #1.
When i drag it or copy it into a new or existing display i don't have "Global Object Parameters Value" option visible.
It's greyed.

Had anyone similar issue?
 

Similar Topics

Hello, I'm using FactoryTalk View ME V10. I created a valve as a global object with multiple parameters and when the object is being used at the...
Replies
2
Views
130
Hello all, I was modifying an HMI in factory talk and went to change a go to display button using the ... to select from a list as I had done...
Replies
4
Views
174
Hello brothers We are contacting you because an error like [display change is currently controlled remotely] occurred while using the equipment we...
Replies
2
Views
211
I'm working on a system with three Panelview 7's connected in a DLR. The system started having miscellaneous DLR faults and they were supposedly...
Replies
1
Views
486
Hello all. Many years ago I programmed an Omron PLC and HMI and I was able to control which display was being shown on the HMI from the PLC. Is...
Replies
5
Views
336
Back
Top Bottom