Once the relays stopped responding, I used your Switch controller tool and was unable to get the relays to work. After cycling the power, everything is fine (until they stop again). I was calling the niSwitch_Disconnect and then the niSwitch_Connect commands to change the state of the relay. I noticed that if the module was reset, an error was returned when making the disconnect call on the "NC" side. Is that normal? Do I have to call the disconnect function on "NC" when switching from "NC" to "NO"? Also, do I need a delay between the disconnect and connect functions? Below is a piece of my code (in Delphi). I have converted your C++ file niSwitch.h over to Delphi.
status := niSwitch_InitWithTopology('SC1Mod8',
NISWITCH_TOPOLOGY_1166_32_SPDT , VI_FALSE, VI_TRUE, @vi8);
checkForError(vi8);
.
.
.
status := niSwitch_Disconnect(vi8,'NC4','COM4');
checkForError(vi8); //go from "NC" to "NO"
status := niSwitch_Connect(vi8,'NO4','COM4');
checkForError(vi8);
.
.
.
status := niSwitch_Disconnect(vi8,'NO4','COM4');
checkForError(vi8); //go from "NO" to "NC"
status := niSwitch_Connect(vi8,'NC4','COM4');
checkForError(vi8);
Thanks,
Greg