ScriptGetFBlockStatus Method - intrepidcs API
C/C++ declare -
VB declare - VB.NET declare
- C# declare - Parameters - Return
Values - Remarks - C/C++ example
- VB example - VB.NET
example - C# example
This method returns the run status of a specified function block within a script on a neoVI device.
C/C++ Declare
int
_stdcall
icsneoScriptGetFBlockStatus(int hObject,
unsigned int iFunctionBlockIndex,
int
*piStatus);
Visual Basic Declare
Public
Declare Function icsneoScriptGetFBlockStatus Lib "icsneo40.dll" (ByVal hObject As Long, ByVal fb_index As Long, ByRef piRunStatus As Long) As Long[DllImport("icsneo40.dll")]
public
static
extern Int32
icsneoScriptGetFBlockStatus(Int32 hObject, UInt32 fb_index,
ref
Int32 piRunStatus);
hObject
[in] Specifies the driver object created by OpenNeoDevice.
iFunctionBlockIndex
[in] The index value of the function
block to start
piStatus
[out] 0 = stopped 1 = running
1 if the function succeeded. 0 if it failed for any reason. GetLastAPIError must be called to obtain the specific error. The errors that can be generated by this function are:
NEOVI_ERROR_DLL_NEOVI_NO_RESPONSE
= 75
NEOVI_ERROR_DLL_SCRIPT_INVALID_FUNCBLOCK_INDEX = 219
NEOVI_ERROR_DLL_SCRIPT_NO_SCRIPT_RUNNING = 226
The script containing the specified function block must have been successfully downloaded to the neoVI using ScriptLoadScript. Execution of the script must have been started by using ScriptStartScript. The valid index values for function blocks within a script can be found in the cmvspy.vs3cmb.h file (Produced by Vehicle Spy. Please see Vehicle Spy documentation).
Examples
Visual Basic Example
Dim
iResult As
Long
Dim iStatus As
Long
'//Get Status of Function Block in
CoreMini
iResult = icsneoScriptGetFBlockStatus(m_hObject,
cboFBToChange.ListIndex, iStatus)
If iResult = 0
Then
lblFBStatus.Caption =
"Failed to get CoreMini Status"
Else
Select
Case iStatus
Case SCRIPT_STATUS_RUNNING
lblFBStatus.Caption = "CoreMini Function
Block Running"
Case SCRIPT_STATUS_STOPPED
lblFBStatus.Caption = "CoreMini Function
Block Stopped"
Case Else
lblFBStatus.Caption = "Unhandled State"
End
Select
End
If
Int32 iResult;
Int32 iStatus=0;
| intrepidcs API Documentation - (C) Copyright 2000-2012 Intrepid Control Systems, Inc. (www.intrepidcs.com) |
Last Updated : Tuesday, December 30, 2008