# Programmatically Disabling a Simulation Device

To disable the simulation of a Camera or Cognex Communications Card programmatically, use the SetSimulationDevice function. This example is based on a Camera device and an Image File device, where the Camera device is named Camera_01, and the Image File device is named Camera_Simulator.

While SetSimulationDevice takes two arguments, the first being the name of the actual device, and the second being the simulation device, to disable the simulation, the second argument is passed an empty string.

Use the following call to disable the simulation of the Camera device: $System.Devices.SetSimulationDevice("Devices.Camera_01", "")