02-23-2011 08:20 AM
Hello
Using LV 8.2 Professional Dev.
I am currently running an application to do some durability testing: basically I am using solenoinds to control air cyclinders which perform opening / closing functionality on a product. I am using a load cell (a mV/V signal via a fieldpoint device) to count the number of cycles completed (for example, when the device is closed it hits the load cell, which passes a threshold, and makes a cycle count)
Recently I experienced an error mode where the product failed as the device never fully closed (thus, it didnt make contact with the load cell)
I would like to stop the application if the the load cell hasnt passed the threshold in a certain amount of time. Any suggestions on how to do this? I am looking for some keywords, but I keep coming up short, however I think that it should be relatively easy to do and I am having a brainfart.
Thanks for your time
jqm
02-23-2011 08:42 AM
jqm,
It depends on how your program is structured. If you have a state machine, it is quite easy to set a timeout when you activate the solenoid. Then in the Read Load Cell state you check both the timeout and the value read from the load cell. It the time limit occurs before the load cell threshold is reached, then you go to a Shutdown state. A Shutdown state is preferable to stopping the program because it allows you to turn off the solenoids, save the data which has been acquired to that point, and log the reason for stopping the test prematurely.
Any program which controls external hardware should be designed to manage failures of significant components. It is also often a good idea to have a hardware "watchdog" circuit which can shut things down if the computer or software fails. This is especially important for systems which can produce hazards to personnel or equipment when failures occur.
Lynn
02-23-2011 08:45 AM
Hey jqm,
I tried some code to do something similar last week. It uses an event structure and shift registers to check the time of an event compared to the last time the event occurred.
The timeout of the event structure is used to do the checking and setting of an indicator and a Value Change to indicate that that the reset event has occurred. Guess in your application the timed out indicator could be replaced by some code to shut down the application, and the event could be caused by writing to a value (signaling) property node?
An example of the code is attached to have a play with.
Hope it helps, or conversely let me know if you figure out a "smarter" way of doing it as I'm open to new thoughts on it!
Cheers,
Mark
02-23-2011 08:51 AM
Hello
Hollroyd: Unfortunately I am only on LV 8.2 and I am unable to view your vi.
if someone could convert it, that would be great.
Thanks for your time
02-23-2011 09:28 AM
Try that!!