03-10-2017 06:29 AM
Hello,
i am controlling a switchbox by sending SCPI commands like ROUT:CLOSE (@1001) and ROUTE:OPEN
After sending the switch command i always send a *OPC? an wait for the returning 1.
Question: Is the 1 only that command finishes executing or also that the hardware physically is really closed?
Would i be better to add a "wait" behind each switch command?
Thx
03-10-2017 06:38 AM
Most devices will respond to the OPC when all commands have been executed. But if you want to be sure, see if you can query the device about the switch state.
03-10-2017 06:50 AM
Yes there is a query-command.
But how can i be sure the query returns the real hardware-state and not that the instrument received a close command in the past? I dont think that switch hardware has an extra switch at each end position (open/close) that is switched if the main switch received the position.
03-10-2017 07:22 AM
Usually it's enough to know you've sent the command or read the info, but if the system is uncertain e.g. if it can be obstructed, you'll need a sensor to make certain.
Of course your previous question can be used ad nauseum, how can you be sure the sensor gives the correct value? Well, in e.g. some fighter planes they have 3 systems, so that 1 failure can't fool you. But what if all 3 are broken? That chance is considered so small the plane is most probably shot down in that case ...
/Y