02-11-2011 01:05 PM
I'm having trouble programaticaly setting the specialty mode of a 9411 c series module. I can set the mode from the project but I need to be able to set the mode programaticaly after detecting which slot it's in. I'm using a cRIO 9074. It seem to work but after refreshing and re-detecting the setup, the cRIO crashes. please see the attatchment.
JY
02-11-2011 02:59 PM
The important thing to keep in mind is that when you change the configuration from "Normal" to "Counter" you are destroying all the existing variables for that module that are booleans and creating an entirely new set of variables with different names that are doubles. Whenever you change the variable set programmatically you should call the Refresh Modules VI in the Scan Engine palette. That tells the scan engine to refresh itself. Another thing to keep in mind is that if you have any subscriptions to the old variables you should probably close them before you change the configuration to prevent having subscriptions to variables that have been destroyed. I'm not sure exactly which problem you have run into, but I wrote a VI to test this and it works OK. It's LV 2010 format, let me know if that's a problem. It discovers all modules in a backplane that are capable of being counters, configures them to actually be counters, and then subscribes to their data.
I'm going to continue to try to reproduce your problem, so let me if there is some other detail you can provide that would help. Also let me know if you have any trouble with that VI.