07-24-2006 09:03 AM
07-26-2006 04:05 AM
Hi John,
There is not an exsisting library function that returns the chassis power status. However, you could use error handling to try and ascertain the power status - if the chassis is not powered it will return errors which you could pick up on.
Can you tell me why you want to determine the chassis power state programmatically?
Regards,
Emma Rogulska
NIUK & Ireland
08-07-2006 10:24 AM
08-07-2006 11:35 AM
Hi John,
I'm afraid I don't understand why if you have a user with the chassis, why you can't just have them make sure it's on before you try to run each time? As if you did programmatically find it was off you would have to get them to switch it on anyway... As I said there is not an existing library function.
Another option would be to monitor the power line of the chassis but this is not simple solution.
Regards
Emma Rogulska
NIUK & Ireland
08-07-2006 12:32 PM
08-08-2006 04:21 AM
Hi John,
Thank you for clarifying the context of the chassis within your application.
The reason that your code is not producing an error is that it is only loading the task, if you were trying to write or read from the task it would prompt an error.
In order to suggest appropriate error handling for your chassis can you tell me what device you are using to communicate to your chassis? - Is it an NI DAQ card within a PC? If so which? And what modules do you have within the chassis? - I can then perhaps even give you error handling that will tell you if an individual module stops working.
Also what software are you using to communicate/control your application? Version?
I am guessing that your error handling has to be done in C?
Regards
Emma Rogulska
Applications Engineer
NIUK & Ireland
08-08-2006 05:18 AM
08-08-2006 06:46 AM
Hi John,
I believe you should be able to check whether your chassis is powered and working correctly using the DAQmxTaskControl function.
There is a full description of this function, it's capabilities and value options in the NI DAQmx C Reference Help.
The NI DAQmx C Reference Help should be on your PC at the following location:
"Start" > "All Programs" > "National Instruments" folder > "NI DAQ" > " NI DAQmx C Reference Help".
This should open up a window. Go to the contents tab and expand the following tree structure nodes:
DAQmx C Functions > Task Configuration/Control > Advanced > DAQmx Task Control.
I would suggest using DAQmx_Val_Task_Commit valu. I tested this by creating an configuring a ficticious SCXI chassis containing 1102B modules and attached to thermistors. I then created a task for the modules and ran it with the DAQmx Task control, with value Task Commit, after which I placed a simple error handler configured to display any errors in a pop-up box.
As I do not actually have the hardware it was the same as if the hardware were present and not powered.
When I ran my code it prompted the following message: "Error -200073 occured at DAQmx Control Task, SCXI module specified in the hardware configuration was not found.
Make sure that the SCXI chassis is powered on, the SCXI cable is properly connected between the chassis communicator and the SCXI module, and that the cabled module specified in the hardware configuration is present in the specified slot.
SCXI Module: SC1Mod1"
I hope that this helps you.
Let me know how you get on,
Regards
Emma Rogulska
Applications Engineer
NIUK & Ireland