Side-connect api plc data table access functions – ProSoft Technology MVI69-ADM User Manual
Page 306

Side-Connect API Library Functions
MVI-ADM ♦ 'C' Programmable
Developer's Guide
'C' Programmable Application Development Module
Page 306 of 342
ProSoft Technology, Inc.
February 20, 2013
11.4 Side-connect API PLC Data Table Access Functions
MVIsc_GetPLCFileInfo
Syntax
int MVIsc_GetPLCFileInfo(HANDLE handle, WORD fileno, MVISCFILEINFO *fileinfo);
Parameters
handle
Handle returned by previous call to MVIsc_Open
fileno
Number of file for which information will be retrieved
fileinfo
Pointer to MVISCFILEINFO structure to receive file information
Description
This function obtains information about a PLC-5 data file.
handle must be a valid handle returned from MVIsc_Open. fileno identifies the
PLC-5 file number for which the information is to be retrieved.
The file type, length in words, and number of elements in the file are returned in
the MVISCFILEINFO structure pointed to by fileinfo. The MVISCFILEINFO
structure is defined as shown:
typedef struct tagMVISCFILEINFO
{
WORD filetype; // File type
WORD num_elements; // File size expressed in elements
DWORD num_words; // File size expressed in words
} MVISCFILEINFO;
The file type is identified by filetype. The possible values for filetype are shown in
Table 2.
PLC-5 Data File Types
Data Type Definition
Value
Description
MVISC_PLCTYPE_O
0
Output
MVISC_PLCTYPE_I
1
Input
MVISC_PLCTYPE_S
2
Status
MVISC_PLCTYPE_B
3
Bit (binary)
MVISC_PLCTYPE_T
4
Timer
MVISC_PLCTYPE_C
5
Counter
MVISC_PLCTYPE_R
6
Control
MVISC_PLCTYPE_N
7
Integer
MVISC_PLCTYPE_F
8
Floating-point
MVISC_PLCTYPE_PD
9
PID
MVISC_PLCTYPE_BT
10
Block Transfer
MVISC_PLCTYPE_MG
11
Message
MVISC_PLCTYPE_SC
12
SFC Status
MVISC_PLCTYPE_ST
13
ASCII String