Jump to content

Use PCM to detect a stop event and send an email?


---
 Share

Recommended Posts

I would like to create a notification via email of either a "Programmable Stop" dialog or if the CMM has stopped due to a collision (example, something in a diameter that causes the CMM to stop).
1. How do I get the event of either case above?
2. I think I can create an email with VBS based on item 1.

Any help is appreciated.
Link to comment
Share on other sites

Zeiss has a software package that will monitor you machine and send out notifications for collisions and other events, i.e. temperature. I don't think it's too expensive
Link to comment
Share on other sites

Yes. We use it. Even a slight stylus collision and an email is sent. With the stylus systems name, stylus, speed, CMM, etc.
Link to comment
Share on other sites

Please sign in to view this quote.

I believe this is possible with both CMM Observer (free trial available) and Smart Services (free version + paid version). Connect with your AMS specialist to review your specific needs to assess which route is most appropriate.

There are some additional options mentioned in the Portal Knowledge Base. I encourage you to search "email" and "batch" for some possibilities you may not have considered.
Link to comment
Share on other sites

I think there's no other possibillity to detect collisions than the software packages mentioned, because when a collision occurs, the Calypso program stops and all PCM code is halted, hence no further output is possible. We have the Smart Services Dashboard (free version) installed, but in my opinion collision e-mails come in somewhat delayed. Too delayed for a quick response. So better test thoroughly before you buy.

As to the programmable stop, it should be sufficient to put some code in the presettings of the stopping feature and create a text file acting as a flag for an observing background task (whatever that may be) which creates the e-mail when the file appears. Delete the file either in the post settings or let the background task do it.
Link to comment
Share on other sites

Jeff eluded to it being accomplished without PCM or the Smart Services Dashboard.

Any time a crash happens, it is logged to a file.

Using task scheduler and Windows Powershell, create a script that monitors the file attribute 'date modified' at certain intervals (1 second, 1 minute, 1 day, etc) of this crash log.

This script will continuously monitor a specified file and write to the console whenever the "date modified" time changes.

# Set the path to the file you want to monitor
$FilePath = "C:\path\to\your\file.txt"

# Get the initial last write time of the file
$LastWriteTime = (Get-Item $FilePath).LastWriteTime

# Start monitoring loop
Write-Host "Monitoring changes to $FilePath..."
while ($true) {
# Sleep for a predetermined interval (e.g., 5 seconds)
Start-Sleep -Seconds 5

# Get the current last write time of the file
$CurrentWriteTime = (Get-Item $FilePath).LastWriteTime

# Check if the last write time has changed
if ($CurrentWriteTime -ne $LastWriteTime) {
# Write a message to the console
Write-Host "File modified at: $CurrentWriteTime"

# Update the last write time
$LastWriteTime = $CurrentWriteTime
}
}

This example writes an alert to the console (Powershell ISE) when the crash log "date modified" attribute changes. Instead of writing to the console, you can have it execute an alert email via more scripting.

ChatGPT is your friend here.
Link to comment
Share on other sites

 Share

×
×
  • Create New...