General Category > Tips & Tricks

Hear Your Alarms, not just an annoying buzzer

(1/3) > >>

Archie:
The MessageDisplayByValue has a property named SpeakMessage. If this is set to true, then each time there is a new message, it will be spoken through the PC speakers. If you wish to get creative, you can find various voices for download on the internet.

BLFTech:
Does this control allow the adding of alarms from a file at runtime?

Archie:
The MessageDisplayByValue has a property named INIFileName that is used to set up alarms from a text file. This is an example of how the file is formatted:

0,CONTROL OFF
1,20F6/ 24VDC SUPPLY POWER OFF
2,20F8/ 24VDC SUPPLY POWER OFF
3,EMERGENCY STOP
4,46Q1/ CIRCUIT BREAKER FEEDER


This is how I typically use the file feature:

1) Add a text file to the project and name it Alarms.txt
2) Type in the alarms as shown above
3) Set the INIFilename to .\alarms.txt
4) Then set the property "Copy to output directory" of the text file to Copy if Newer

BLFTech:
Thanks Archie, that works nicely.

I also added the code from another thread to log the alarms on a text change event and for some reason it logs data almost continuously. Any ideas why the textchange event would trigger without the text changing?

Archie:

--- Quote from: BLFTech on August 20, 2013, 07:23:06 PM ---I also added the code from another thread to log the alarms on a text change event and for some reason it logs data almost continuously. Any ideas why the textchange event would trigger without the text changing?

--- End quote ---
I found a problem with the way it built the message that caused the event to fire every time data was returned from the PLC. I put in a fix for the next release.

Navigation

[0] Message Index

[#] Next page

Go to full version