ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
10-26-2010 11:57 AM
Is this a bug?
I get an IA_Status = 0, ie, successful, when doing a FP_CreateTagIOPoint(...) on a cFP unit that is not powered. I would expect an error, unless this function call does not try to access the specified cFP module at all.
But then, why is there no "aliveness" test fuction in FieldPoint.h? How do you determine if a cFP system is out there, connnected, powered and responding? My application needs to take evasive action on initialization, if one of the three cFP systems is not responding. It seems to me that the only way is to complete the erroneous initialization functions, then try to read something. That will definately throw an error.
10-27-2010 10:07 AM
All tags get created when you call FP_Open for a given iak file (if there is not iak file then the last saved iak file is created). CreateTagIOPoint simply returns a handle to the desired tag that was created with FP_Open. "Create" in the function name is a bit misleading. it should have been more like "Get" as create doesn't create anything internally.
To test if a system is connected, powered and responding, I would recommend you take a look at implementing a Watchdog. Watchdogs are utilities that monitor for specific system events and failures. These utilities can be either software or hardware, where available.
11-01-2010 10:30 AM
StephanieO,
As you recommend, I am trying to set up a watchdog in addition to detecting cFP unit presence during initialization. I am using the 1800 series controller, not the 2000, so this is not a real-time application.
Apparently the FP_Advise() function call does not access the hardware either. When cFP unit power is off during initialization, this function call is successful. What does FP_Advise actually do? I figured that it started the controller scanning the selected module. It apparently sets up scanning which starts later. How much later? What causes scanning to trigger, if not the FP_Advise function?
I am back to the issue of how to set up a watchdog. The only thing I can figure to do is do a single module FP_Read at regular intervals, and look for an error returned from the call.
Your thoughts?
Thanks...
11-02-2010
05:01 PM
- last edited on
07-02-2024
01:33 PM
by
Content Cleaner
The FP Advise function asynchronously reads values from a FieldPoint item at a specified rate. You are correct that it does not access the hardware. One of the parameters is the rate that you set.
As for the watchdog I had mentioned, I has just assumed you were using a Real-Time cFP unit. You can still set up a network watchdog that will flag an event. Here is a link for a FAQ about watchdogs.