IFIX 5.5 How can i make a picture object visible from a tag

Join Date
Apr 2010
Location
Penrith
Posts
14
Hi
I'm working on IFIX 5.5. I need to open a operator prompt to be visible based on the status of a tag that is read from the plc.

When i say operator prompt, just a picture that is made visible.

Thanks in anticipation
 
Thanks Parky, really appreciate your time.
I think your answer is applicable to an picture object where the visibility tag field can be populated.

For my situation i just need a picture ie MASH.ODF ( a small box with text and a button) to be visible. The picture itself doesn't have a visibility property. I have only ever opened a picture by pressing a button that invokes a script to open pic.

Hope this clarifies.
 
Ah.. Not sure but perhaps if it's possible make it into an object when I last did something like that was to create a popup screen, changed the default layout i.e. remove the usual window bits to try & make it more like a picture, then use a script to hide or close the window. But that was not on IFIX perhaps that will work
 
Based on your calling a picture mash.odf you are using the old style view.exe instead of the modern workspace.exe.

You can use the key macro editor and specify a function key "AUTO" that will continuously run code and conditionally open pop-up pictures.

Does it have to be a separate picture that pops up? If so, each ODF can have code that fires upon picture open (in draw.exe, go to edit > picture, commands on opening) which can probably open another subpic. But this only fires once when the main pic is opened as the name implies.

If it doesn't need to be a separate picture, what about just a section of the screen with the required text and button that is grouped together and becomes visible based on the PLC value?
 
Hi Shane
Thanks for you response. I really want it to be a separate picture. So your suggestion of a picture with the field point to a function key macro was appealing. I'm having a problem getting it to work.
1)I have created a picture names ATEST.ODF
2) The ATEST.ODF macro field points to a macro names testmac
3) The Macro testmac has "CTRL-A" in the Function key field.
4) In the Macro Command field it has IF COOK1:TEST_BIT.F_CV == 1; OPENPIC ATEST;ENDIF

Any ideas why it wont work?

thanks in anticipation
 
Do you have a view.kmx file in your PIC folder with the other ODF files? This is the file you want to edit with the key macro editor, then add an entry for function key "AUTO" (I think you have to type that in) for code that always auto runs when view.exe is running.

As for #4, not sure if you added the semicolons just for clarity while posting on this forum, but the actual syntax would be (I think...)

IF (COOK:TEST_BIT.F_CV == 1)
OPENPIC ATEST # check help for OPENPIC, think you need Y,X coord
ENDIF

You can put your code behind a normal button on a normal pic just to test it out and make sure it works before moving on to the more complex key macro "AUTO" stuff.
 
Thanks once again.
I tried what you said and put the code behind a button. It worked fine.
I then put the script in the view macro command field with AUTO typed in the Function key field. I also changed the macro field of the Atest.odf picture to view.kmx.
It just wont work.
 
I don't think you need the macro file specified on the ATEST.ODF. My understanding is that the VIEW.KMX file is "active" at all times when View.exe is running.

I think the actual code behind AUTO needs to loop indefinitely. The way you have it now it might just run the once and then exit.

Try this code (yes the & on the first line but not the last is intentional):

&start
pause 3

// your existing if code here

goto start
 
Running out of ideas here but have you tried closing out of view.exe and reopening, or maybe restart iFIX?

What if you remove the conditional part of the AUTO code, and just openpic ATEST? (to rule out the value not == what you think it does).
 
I noticed that your AUTO entry in the key macro list was #24, so I am guessing you have entries 1-23? Are these function key definitions perhaps? If so, do these function key macros work as defined?

Just wondering if the view.kmx definitions are being referenced by view.exe at all. If your function key definitions work this would seem to prove the view.kmx file is being looked at. Even if they do seem to work, change a function key def in view.kmx and make sure the changed key's behavior follows the code change you made.

View.kmx should be in your PIC folder... are you sure that is the location you are editing?
 

Similar Topics

Sorta a dumb question but... I want to duplicate a picture to work on some changes to the graphic.. so "picOriginal", I want a copy of that...
Replies
3
Views
1,901
Anyone have an idea on how I can get an animation to work. when I click on the button to go to another picture, I want to animate certain items on...
Replies
7
Views
2,207
Is there a way to have a DI tag open a picture? I want to make a confirm/abort pop up, but I'm stuck.
Replies
9
Views
2,549
Hi. I have a Proficy iFIX V5.8 & V5.5 & V3.5. In the iFIX WorkSpace V5.5, V5.8 can open multiple instances of a single picture: OpenPicture &...
Replies
0
Views
3,115
- Looking to move events from log files to a screen. - Similar to the alarms on a banner / just using the events to be shown
Replies
0
Views
2,088
Back
Top Bottom