Hello,
We have a pair of calibration programs that need to be run at the beginning of the day prior to running production. How could I automatically "lock up" the machine until the operator runs these programs? If there is a method of doing this in VBA, that would be ideal.
Thanks,
M
If not too much then you probably don't need to use VBA.
You could have a bit of code at the start of each program that reads in a text file, all this file needs to contain is the date. If the date doesn't match the current date then you end the program/routine.
At the end of the calibration program you simply make it write the current date to the text file.
I was talking to a controls engineer about this and we were looking at doing something similar by using a PLC and tying into the e-stop circuitry on the machine, the script seems like a much simpler way to go about fixing the issue but a PLC will guarantee that the operators can't bypass it. Not sure if that functionality is there on all CMM's but we already have a custom I/O box tied to another interlock that we can use.
I like this idea but it would require updating 3000 programs. Is there a way of automating such a thing? Or creating a program that always runs at the start of every program by default.
Unfortunately I don't really have any more details at the moment. I have some info for the I/O configuration on my new Global S but we had a custom I/O setup for a crane interlock and that's the reason that I have copies of all of those wiring diagrams. We haven't gotten any farther into this idea than looking at how to hook up with the emergency stop. If you have a hexagon CMM you can reach out directly to them through your sales contact and they can hook you up with the info you're looking for. I've had great luck with getting everything I need from the hexagon guys once I find the right person to ask.
Yes - I've created scripts to do bulk program updates before (i.e. change/standardise touch speed, rename all probes etc.)
If you do a search for 'rename probes' you should find a thread with some tools to do this, which could be modified to suit your needs.
To see the code for adding the necessary assignments to your programs, add it to one program, then export the program as Basic (which you can view in notepad).
You should be able to see the code you'd need to combine with the rename probes code to achieve your goal.