Hello,
I run the card with the Toolkit-Functions (the Hilscher driver is not used). I created a CONFIG.nxd with the SYCON tool and tested the configuration with it successfuly.Then i start the card with the firmware for the Profibus stack and the CONFIG file. After this i did the following:
xChannelOpen();
xChannelHostState(...CIFX_HOST_STATE_READY...);
xChannelConfigLock(CIFX_CONFIGURATION_UNLOCK);
// Stack Configuration ...
xChannelConfigLock(...CIFX_CONFIGURATION_LOCK...);
xChannelBusState(...CIFX_BUS_STATE_ON...);
Cyclic Data Transfer should work from here.
This does not work because the stack does not have any bus or slave parameters. But those parameters are saved in the CONFIG file. If I write the bus and slave params with the PROFIBUS_FSPMM_CMD_INIT_REQ and PROFIBUS_FSPMM_CMD_DOWNLOAD_REQ between xChannelConfigLock(CIFX_CONFIGURATION_UNLOCK) and xChannelConfigLock(...CIFX_CONFIGURATION_LOCK...) the bus works fine in the end.
My question is now: How can I tell the stack that it is supposed to use the params from the CONFIG file?
Andreas Jacob
Hilscher Gesellschaft fuer Systemautomation mbH
Hello TomP,
maybe the following code snippet will help.
Regards
AJ