Welcome Guest ( Login | Register )



All times are UTC - 7 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Playing and Stopping a video by a tag status
PostPosted: Tue May 26, 2015 5:08 pm 

Joined: Sun Apr 12, 2015 4:10 pm
Posts: 1

Offline
Hello,

I am able to play a video in DEMO Mode which I will upload to a pc as a runtime ultimately. I need to start a video according to a tag status. Is it possible in iX developer?

Thank you very much for your time...


 Profile  
 
 Post subject: Re: Playing and Stopping a video by a tag status
PostPosted: Wed Jun 10, 2015 2:55 pm 
User avatar

Joined: Wed Apr 09, 2014 3:16 pm
Posts: 36

Offline
There are a couple of ways I would go about this. Please remember that iX Developer is event driven. So we need something to trigger the video (like a tag change you mentioned above).

The first way I would go about it is to go to the screen with the media player on it and have some kind of a trigger (like an analog numeric input value change) and use this code:

if(Globals.Tags.Tag1.Value == 20)
MediaPlayer.Play();
else
MediaPlayer.Stop();

That would play the video on the screen. If you wanted to do it from a script module, or from the tags scripting area, the best way would be to have a popup window that is the same size as the video player you want, and then when the tag gets to whatever value you want to trigger the video with, you would open the popup like this:
if (Globals.Tags.Tag1.Value == 20)
PopupScreen.Show();
else
PopupScreen.Close();

In the popup screen scripting area, you would put under the "Opened" action:
MediaPlayer.Play();

If you need additional help, I can upload a sample program that does this.

_________________
Best Regards,

Kyle W. | Applications Engineer
Beijer Electronics, Inc.


 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 7 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: