Trigger a sound file with PLC

jwoito11

Member
Join Date
Jan 2015
Location
Ontario
Posts
15
Hey everyone, I'm doing a project for school and am looking for ways I can trigger a sound file using a PLC program. My first thought was maybe an output could trigger a sound file in factorytalk but I have no idea how I would do that. If anybody could help me with this, either with factorytalk, or any other way please let me know. Thank you
 
I have no experience with factorytalk, I'll let somebody else answer that.

It is very easy to do in LabVIEW tho. Since you are a student, you are eligible to download a free student version of LabVIEW.
 
My first thought was maybe an output could trigger a sound file in factorytalk but I have no idea how I would do that.
In the original RSView32, the internal PLC beeper could be triggered by setting up an Alarm point. Then under "Alarms", select "Alarm Setup", then "Severities", then under "Annunciation", select "Internal Bell".

There were several ways to call an external file, including Macros, Events, and the Command Line.
 
Last edited:
This can be done fairly easy with AdvancedHMI. With the MessageDisplayByValue you could even get it to speak messages.

But just to play a wav file:

- Open AdvancedHMI in Visual Studio
- Build the Solution
- From the Toolbox, Add an EthernetIPforCLXCom driver to the MainForm
- In the Properties Window, set the IPAddress to the address of the controller
- From the Toolbox, Add a DataSubsriber to the form
- In the property window, set PLCAddressValue to a tag name with the bit used to trigger the sound
- Double click the DataSubscriber so it will take you back to code
- Enter this code:

Dim player As System.Media.SoundPlayer = New System.Media.SoundPlayer("C:\Windows\Media\ir_inter.wav")
player.Play()

- Run the application and change the bit value in your PLC
 
You mentioned "FactoryTalk", which is a name for a wide variety of software from Rockwell Automation.

Are you using FactoryTalk View ? Maybe FactoryTalk View Machine Edition for the PanelView Plus terminals, or FactoryTalk View SE for distributed PC-based HMI and SCADA applications ?

Neither ME or SE has a native sound player feature, but it's fairly straightforward to embed the Windows Media Player ActiveX into a screen and trigger it with the Update connection.

You'll find ActiveX objects under the Object menu, and the Windows Media Player ActiveX should be registered and available on all Windows computers.
 
I'm using factorytalk view studio machine edition. I have windows media player in the display but I don't see an update connection
 
doing it in Factory talk SE is easy, throw a VBA Routine in a bit value from Logix 5000 when it goes true the VBA runs calling your wav file " simple, i'll post the Code you need in just a bit....
 
btw. Love advanced HMI , use it exclusively independently but the Bidding cost always throws Clients off , Clients seeing a $1,000 cost instead of a $15,000 always raises red flags and millions of questions from board members..always offer it as useability after the bid is won....
 
btw. Love advanced HMI , use it exclusively independently but the Bidding cost always throws Clients off , Clients seeing a $1,000 cost instead of a $15,000 always raises red flags and millions of questions from board members..always offer it as useability after the bid is won....
Just bid $15k and we can split the profit...j/k. But seriously the way I win in that situation is if I know my competitor would bid $15k and spend a huge chunk in software fees, I would bid $14k, get the job, then use the money to spend much more time giving them a much better HMI than they would have ever expected and also include a couple hours training so they don't feel blind sided on new software. More money is earned and future business is almost always guaranteed.
 
Advanced HMI

Yes absolute, 100% agree, "i'll split with ya...:) " btw, in the Manual or otherwise does it describe on how to connect to an OPC server / RSLinx , kepware , Matrikon Etc. , sorry to be off topic to original Poster
 
Yes absolute, 100% agree, "i'll split with ya...:) " btw, in the Manual or otherwise does it describe on how to connect to an OPC server / RSLinx , kepware , Matrikon Etc. , sorry to be off topic to original Poster
OPC can really be a pain because every OPC server has it's own way of naming and the tag addressing is also different. The default settings for OpaDaCom is for Bosch, but the addressing that has to be used with controls is a very long string. AB is the only one that I have tested that does require a Topic defined, but the addressing in the controls is the same as you reference them in the program.

So the answer is, there is no easy universal answer. It requires digging through the manuals of the specific OPC server to find what the OPCServerName should be and how to create addressing strings.
 

Similar Topics

Hi i would like to ask! Im using Omron CP1E PLC May i know how to use one input to trigger two outputs alternatively? Meaning press X0 on, Y0...
Replies
11
Views
397
Hi all, I use e won for my OPCUA to back up my PLC (B&R X20 system) data. Whenever e won does maintenance updates, I need to reboot the e won in...
Replies
2
Views
470
Hello ladies and gents I’ve hit a road block on a project, it’s AB for preface this is a converting line including Winder tailsealer and...
Replies
4
Views
768
Hi, I'm using CX Programmer and just seeing what the best way to trigger an output from the plc clock time would be. I need this to come on at 9am...
Replies
4
Views
1,741
I am trying to have my Alarm Summary page open when an alarm goes active (I am using ALMD blocks) this is the expression I am trying to use...
Replies
5
Views
1,218
Back
Top Bottom