Description
Reads the parameters of the PROFIBUS master function.
Universal Fanuc Driver
Fanuc Focas Library CD
Declaration
Arguments
Specify the library handle. See "Library handle" for details.
Specifies the kind of PROFIBUS master parameter.
The structure slvslt_ind is used according to the kind of the parameter.
0 | : | Bus parameter |
1 | : | allocated PMC address of mode |
/* parameter for each slave station */
20 | : | Slave sub parameter |
21 | : | Slave parameter |
22 | : | allocate of diagnosis data |
/* parameter for each slot module */
40 | : | Module data |
41 | : | allocated PMC address of DI/DO data |
(note) about using slvslt_ind
0 to 1 | : | slvslt_ind is not used. |
20 to 22 | : | slvslt_ind.slv_no is used. |
40 to 41 | : | slvslt_ind.slv_no and slvslt_ind.slt_no are used. |
Specifies the pointer to the T_SLVSLT_IND structure.
The T_SLVSLT_IND structure is as follows. When the slave station or slot module is set to type, this structure is used.
typedef struct _T_SLVSLT_IND{
unsigned char slv_no;
unsigned char slt_no;
} T_SLVSLT_IND;
- slv_no
- Station number of slave. range: from 0 to 125
- range: from 0 to 125
- slt_no
- Slot number.
- range: from 0 to 127
Specifies the pointer to the OUT_PBMPRM structure to store the acquired parameter. The OUT_PBMPRM structure is as follows.
/*- parameter of master function -----------------------------------*/
typedef struct _OUT_PBMPRM{
union {
T_BUS_PARA bus_para;
T_MODE_ADDR_ALLOC mode_addr_alloc;
T_SLAVE_SUB_PARA slv_sub_para;
T_SLAVE_PARA slv_para;
T_DGN_ADDR_ALLOC dgn_addr_alloc;
T_MODULE_DATA module_data;
T_DIDO_ADDR_ALLOC dido_addr_alloc;
} prm;
} OUT_PBMPRM;
/*- BUS PARAMETER -----------------------------------------*/
typedef struct _T_BUS_PARA
{
unsigned char fdl_add; /* station no. */
unsigned char baud_rate;
unsigned short tsl;
unsigned short min_tsdr;
unsigned short max_tsdr;
unsigned char tqui;
unsigned char tset;
unsigned long ttr;
unsigned char g;
unsigned char hsa;
unsigned char max_retry_limit;
unsigned char bp_flag;
unsigned short min_slave_interval;
unsigned short poll_timeout;
unsigned short data_control_time;
unsigned char reserved[6];
char master_class2_name[32];
T_MAS_USR mas_usr;
} T_BUS_PARA;
/* MASTER USER DATA */
typedef struct _T_MAS_USR
{
unsigned short master_user_data_len;
unsigned char master_user_data[62];
} T_MAS_USR;
/*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/
typedef struct _T_MODE_ADDR_ALLOC
{
unsigned char md_path;
unsigned char md_kind;
unsigned short md_top_address;
unsigned char md_size;
unsigned char pad;
} T_MODE_ADDR_ALLOC;
/*- SLAVE SUB-PARAMETER -----------------------------------*/
typedef struct _T_SLAVE_SUB_PARA
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char slv_enable;
unsigned char slt_num;
} T_SLAVE_SUB_PARA;
/*- SLAVE PARAMETER -------------------------------------*/
typedef struct _T_SLAVE_PARA
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char sl_flag;
unsigned char slave_type;
unsigned char reserved[12];
T_PRM_DATA prm_data;
T_CFG_DATA cfg_data;
T_SLV_USR_DATA slv_usr;
} T_SLAVE_PARA;
/* PARAMETER DATA */
typedef struct _T_PRM_DATA
{
unsigned char station_status;
unsigned char wd_fact_1;
unsigned char wd_fact_2;
unsigned char min_tsdr;
unsigned short ident_number;
unsigned char group_ident;
unsigned char pad;
T_USR_PRM_DATA usr_prm;
} T_PRM_DATA;
/* USER PARAMETER DATA */
typedef struct _T_USR_PRM_DATA
{
unsigned short user_prm_data_len;
unsigned char user_prm_data[201];
unsigned char pad;
} T_USR_PRM_DATA;
/* CONFIGURATION DATA */
typedef struct _T_CFG_DATA
{
unsigned short cfg_data_len;
unsigned char cfg_data[128];
} T_CFG_DATA;
/* SLAVE USER DATA */
typedef struct _T_SLV_USR_DATA
{
unsigned short slave_user_data_len;
unsigned char slave_user_data[30];
} T_SLV_USR_DATA;
/*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
typedef struct _T_DGN_ADDR_ALLOC
{
T_SLAVE_IND_PARA slv_ind_para;
unsigned char dgn_path;
unsigned char dgn_kind;
unsigned short dgn_top_address;
unsigned char dgn_size;
unsigned char pad;
} T_DGN_ADDR_ALLOC;
/*- MODULE DATA ---------------------------------------*/
typedef struct _T_MODULE_DATA
{
T_SLOT_IND_PARA slt_ind_para;
unsigned short module_len;
unsigned char module_data[128];
} T_MODULE_DATA;
/*- ALLOCATION OF DI/DO DATA --------------------------------------*/
typedef struct _T_DIDO_ADDR_ALLOC
{
T_SLOT_IND_PARA slt_ind_para;
unsigned char di_path;
unsigned char do_path;
unsigned char di_kind;
unsigned char do_kind;
unsigned short di_top_address;
unsigned short do_top_address;
unsigned char di_size;
unsigned char do_size;
unsigned char module_type;
unsigned char pad;
} T_DIDO_ADDR_ALLOC;
/* SLAVE INDICATION PARAMETER */
typedef struct _T_SLAVE_IND_PARA
{
unsigned char slv_idx;
unsigned char slv_no;
} T_SLAVE_IND_PARA;
/* SLOT INDICATION PARAMETER */
typedef struct _T_SLOT_IND_PARA
{
unsigned char slv_no;
unsigned char slt_no;
} T_SLOT_IND_PARA;
- prm.bus_para.fdl_add
- "FDL_Add" of PROFIBUS standards Station number of master(self-node)
- range: from 0 to 125
- prm.bus_para.baud_rate
- "Baud_rate" of PROFIBUS standards
0 : 9.6 Kbps 1 : 19.2 Kbps 2 : 93.75 Kbps 3 : 187.5 Kbps 4 : 500.0 Kbps 6 : 1.5 Mbps 7 : 3.0 Mbps 8 : 6.0 Mbps 9 : 12.0 Mbps - prm.bus_para.tsl
- "T SL" of PROFIBUS standards
- range: from 1 to 65535
- unit: bit time
- prm.bus_para.min_tsdr
- "min T SDR" of PROFIBUS standards
- range: from 1 to 65535
- unit: bit time
- prm.bus_para.max_tsdr
- "max T SDR" of PROFIBUS standards
- range: from 1 to 65535
- unit: bit time
- prm.bus_para.tqui
- "T QUI" of PROFIBUS standards
- range: from 0 to 255
- unit: bit time
- prm.bus_para.tset
- "T SET" of PROFIBUS standards
- range: from 1 to 255
- unit: bit time
- prm.bus_para.ttr
- "T TR" of PROFIBUS standards
- range: from 1 to 16777215
- unit: bit time
- prm.bus_para.g
- "G" of PROFIBUS standards
- range: from 1 to 100
- prm.bus_para.hsa
- "HSA" of PROFIBUS standards
- range: from 2 to 126
- prm.bus_para.max_retry_limit
- "max_retry_limit" of PROFIBUS standards
- ange: from 1 to 8
- prm.bus_para.bp_flag
- "Bp_Flag" of PROFIBUS standards
bit7 : Error_Action_Flag bit6-0 : reserved - prm.bus_para.min_slave_interval
- "Min_Slave_Interval" of PROFIBUS standards
- range: from 1 to 65535
- unit: 100 micro seconds
- prm.bus_para.poll_timeout
- "Poll_Timeout" of PROFIBUS standards
- range: from 1 to 65535
- unit: 1 milli-second
- prm.bus_para.data_control_time
- "Data_Control_Time" of PROFIBUS standards
- range: from 1 to 65535
- unit: 10 milli-seconds
- prm.bus_para.reserved[n](n : 0 to 6)
- reserved
- prm.bus_para.master_class2_name[n](n : 0 to 31)
- "Master_Class2_Name" of PROFIBUS standards
- ASCII string up to 32 bytes
- prm.bus_para.mas_usr.master_user_data_len
- the value decreasing -2 from "Master_User_Data_Len" of PROFIBUS standards
- range: from 0 to 62
- unit: byte
- prm.bus_para.mas_usr.master_user_data[n](n : 0 to 61)
- "Master_User_Data" of PROFIBUS standards
- prm.mode_addr_alloc.md_path
- PMC path number
- range: from 1 to 3
- prm.mode_addr_alloc.md_kind
- PMC address
- range: R or E
- prm.mode_addr_alloc.md_top_address
- top number of PMC address
- range: depend on the PMC address
- prm.mode_addr_alloc.md_size
- unused
- prm.mode_addr_alloc.pad
- unused
- prm.slv_sub_para.slv_ind_para.slv_idx
- number of slave index
- range: from 0 to 47
- prm.slv_sub_para.slv_ind_para.slv_no
- number of slave station
- range: from 0 to 125
- prm.slv_sub_para.slv_enable
- show whether the communication with the slave is valid or invalid
0x00 : invalid 0xff : valid - prm.slv_sub_para.slt_num
- number of slot for I/O module
- range: from 1 to 128
- prm.slv_para.slv_ind_para.slv_idx
- number of slave index
- range: from 0 to 47
- prm.slv_para.slv_ind_para.slv_no
- number of slave station
- range: from 0 to 125
- prm.slv_para.sl_flag
- "Sl_Flag" of PROFIBUS standards
bit7 : Active bit6 : New_Prm bit5-0 : reserved - prm.slv_para.slave_type
- "Slave_Type" of PROFIBUS standards
- range: from 0 to 255
- prm.slv_para.reserved[n](n : 0 to 11)
- reserved
- prm.slv_para.prm_data.station_status
- "Station_status" of PROFIBUS standards
bit7 : Lock_Req bit6 : Unlock_Req bit5 : Sync_Req bit4 : Freeze_Req bit3 : WD_On bit2-0 : reserved - prm.slv_para.prm_data.wd_fact_1
- "WD_Fact_1" of PROFIBUS standards
- range: from 1 to 255
- unit: milli-second
- prm.slv_para.prm_data.wd_fact_2
- "WD_Fact_2" of PROFIBUS standards
- range: from 1 to 255
- unit: milli-second
- prm.slv_para.prm_data.min_tsdr
- "min T SDR" of PROFIBUS standards
- range: from 0 to 255
- unit: bit time
- prm.slv_para.prm_data.ident_number
- "Ident_Number" of PROFIBUS standards
- prm.slv_para.prm_data.group_ident
- "Group_Ident" of PROFIBUS standards
bit7 : Group8 bit6 : Group7 bit5 : Group6 bit4 : Group5 bit3 : Group4 bit2 : Group3 bit1 : Group2 bit0 : Group1 - prm.slv_para.prm_data.pad
- unused
- prm.slv_para.prm_data.usr_prm.user_prm_data_len
- length of "User_Prm_Data" of PROFIBUS standards
- range: from 0 to 201
- unit: byte
- prm.slv_para.prm_data.usr_prm.user_prm_data[n](n : 0 to 200)
- "User_Prm_Data" of PROFIBUS standards
- prm.slv_para.prm_data.usr_prm.pad
- unused
- prm.slv_para.cfg_data.cfg_data_len
- the value decreasing -2 from "Cfg_Data_Len" of PROFIBUS standards
- range: from 0 to 128
- unit: byte
- prm.slv_para.cfg_data.cfg_data[n](n : 0 to 127)
- "Cfg_Data" of PROFIBUS standards
- prm.slv_para.slv_usr.slave_user_data_len
- the value decreasing -2 from"Slave_User_Data_Len" of PROFIBUS standards
- range: from 0 to 30
- unit: byte
- prm.slv_para.slv_usr.slave_user_data[n](n : 0 to 29)
- "Slave_User_Data" of PROFIBUS standards
- prm.dgn_addr_alloc.slv_ind_para.slv_idx
- number of slave index
- range: from 0 to 47
- prm.dgn_addr_alloc.slv_ind_para.slv_no
- number of slave station
- range: from 0 to 125
- prm.dgn_addr_alloc.dgn_path
- PMC path number
- range: from 1 to 3
- prm.dgn_addr_alloc.dgn_kind
- PMC address
- range: R or E
- prm.dgn_addr_alloc.dgn_top_address
- top number of PMC address
- range: depend on the PMC address
- prm.dgn_addr_alloc.dgn_size
- the size of diagnosis data
- range: from 0 to 244
- unit: byte
- prm.dgn_addr_alloc.pad
- unused
- prm.module_data.slt_ind_para.slv_no
- number of slave station
- range: from 0 to 125
- prm.module_data.slt_ind_para.slt_no
- module number of slot
- range: from 0 to 127
- prm.module_data.module_len
- the length of "module" of PROFIBUS standards
- range: from 0 to 128
- unit: byte
- prm.module_data.module_data[n](n : 0 to 127)
- "module" of PROFIBUS standards
- prm.dido_addr_alloc.slt_ind_para.slv_no
- number of slave station
- range: from 0 to 125
- prm.dido_addr_alloc.slt_ind_para.slt_no
- module number of slot
- range: from 0 to 127
- prm.dido_addr_alloc.di_path
- PMC path number of DI data
- range: from 1 to 3
- prm.dido_addr_alloc.do_path
- PMC path number of DO data
- range: from 1 to 3
- prm.dido_addr_alloc.di_kind
- PMC address of DI data
- range: R or E
- prm.dido_addr_alloc.do_kind
- PMC address of DO data
- range: R or E
- prm.dido_addr_alloc.di_top_address
- top number of PMC address of DI data
- range: depend on the PMC address
- prm.dido_addr_alloc.do_top_address
- top number of PMC address of DO data
- range: depend on the PMC address
- prm.dido_addr_alloc.di_size
- the size of DI data
- range: from 0 to 244
- unit: byte
- prm.dido_addr_alloc.do_size
- the size of DO data
- range: from 0 to 244
- unit: byte
- prm.dido_addr_alloc.module_type
- type of module
1 : INPUT only 2 : OUTPUT only 3 : INPUT and OUTPUT 4 : no INPUT and no OUTPUT 200 : out of size for INPUT/OUTPUT 201 : violation of PROFIBUS standards 255 : unsetting - prm.dido_addr_alloc.pad
- unused
/*- BUS PARAMETER -----------------------------------------*/
/* MASTER USER DATA */
/*- ADDRESS ALLOCATION FOR MODE -----------------------------------*/
/*- SLAVE SUB-PARAMETER -----------------------------------*/
/*- SLAVE PARAMETER -------------------------------------*/
/* PARAMETER DATA */
/* USER PARAMETER DATA */
/* CONFIGURATION DATA */
/* SLAVE USER DATA */
/*- ALLOCATION OF DIAGNOSIS DATA ---------------------------------------*/
/*- MODULE DATA ---------------------------------------*/
/*- ALLOCATION OF DI/DO DATA --------------------------------------*/
Return
EW_OK is returned on successful completion, otherwise any value except EW_OK is returned.
The major error codes are as follows.
Return code | Meaning/Error handling | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
(5) |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||
(6) |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
|||||||||||||||
(13) |
In order to get more information for this err_no return value, execute cnc_getdtailerr function. err_no of ODBERR structure.
|
As for the other return codes or the details, see "Return status of Data window function"
CNC option
This function need the following CNC option.
For HSSB connection,
CNC parameter
This function is not related to CNC parameter.
CNC mode
This function can be used in any CNC mode.
Available CNC
0i-A | 0i-B/C(Note) | 0i-D | 0i-F | 15 | 15i | 16 | 18 | 21 | 16i-A | 18i-A | 21i-A | 16i-B | 18i-B | 21i-B | 30i-A | 30i-B | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
M (Machining) | |||||||||||||||||
T (Turning) | - | ||||||||||||||||
LC (Loader) | - | - | - | - | - | - | - | - |
0i-D | 0i-F | 16i | 18i | 30i-A | 30i-B | |
---|---|---|---|---|---|---|
P (Punch press) | - | |||||
L (Laser) | - | - | - | - | ||
W (Wire) | - | - |
Power Mate i-D | |
Power Mate i-H | |
Power Motion i-A | O |
"O" | : | Both Ethernet and HSSB | |
"E" | : | Ethernet | |
"H" | : | HSSB | |
"X" | : | Cannot be used | |
"-" | : | None |
Note) 0i-C does not support the HSSB function.
See Also