Hi. I would like to ask about data transfer between Excel and Freelance . Please check the details below.
I have noticed that you have the best answers to the questions for data transfer between Excel and ABB Freelance, but I couldn't see
the links or samples that you have given in the forum. So, I have decided to ask you directly.
I would like to send a set of data in Excel format to an AC700F CPU in order to be used as set points of the controlled process.
I'm using Freelance 2016 and Excel 2016 versions. I have checked so many documents but most of them were either old or for
different versions.
I'll be glad if you can send me information how to set up an OPC gateway on DCS side and a sample Excel sheet including the code
Thanking in advance and best regards.
the links or samples that you have given in the forum. So, I have decided to ask you directly.
I would like to send a set of data in Excel format to an AC700F CPU in order to be used as set points of the controlled process.
I'm using Freelance 2016 and Excel 2016 versions. I have checked so many documents but most of them were either old or for
different versions.
I'll be glad if you can send me information how to set up an OPC gateway on DCS side and a sample Excel sheet including the code
Thanking in advance and best regards.
Answers
Before going into the Excel OPC Gateway solution, did you have a look at the Time Scheduler function. This function comes with a function block TS in the Analog Function Blocks group and a Time Scheduler display for Freelance Operations. The Time Scheduler function allows to set up to 32 Values, each associated with a duration. The configured values are presented at the OUT output of the function block for the belonging duration and can be tied to the Setpoint input of a PID function block.
There is also the possibility to use a SFC in case your Setpoints are more process state and logic driven, than time driven. The steps in the SFC would write the Setpoints to the PID controller function blocks and the transitions would check for the process state and the logic.
Now to the Excel based solution.
You would need to set up an OPC Gateway in the P-Tree. You would insert Gateway Station at the same level like a controller resource or an Operator Station (VIS). The parameter Type of gateway makes it to an OPC Gateway. Add a Gateway to the hardware Structure and assign the OPC Gateway created to it.
Do a plausibility check and then make sure that all the tags and variables that you want to access via the OPC Gateway have Read/Write access in the Gateway view of Tag- and Variable list.

Also do the settings in the Freelance Settings tool for the OPC Gateway.Check that resource ID in the Network Configuration match the resource ID specified in the Settings tool on the PC running the OPC Gateway.
In the Appendix A of the manual 3BDD012511-111_A_en_Freelance_Engineering_OPC_Server_F you will find an example how to connect from Excel to the OPC Server. The example uses Visual Basic for Applications (VBA) for Excel to communicate with the OPC Gateway.
Hope that helps.
There is also the possibility to use a SFC in case your Setpoints are more process state and logic driven, than time driven. The steps in the SFC would write the Setpoints to the PID controller function blocks and the transitions would check for the process state and the logic.
Now to the Excel based solution.
You would need to set up an OPC Gateway in the P-Tree. You would insert Gateway Station at the same level like a controller resource or an Operator Station (VIS). The parameter Type of gateway makes it to an OPC Gateway. Add a Gateway to the hardware Structure and assign the OPC Gateway created to it.
Do a plausibility check and then make sure that all the tags and variables that you want to access via the OPC Gateway have Read/Write access in the Gateway view of Tag- and Variable list.
Also do the settings in the Freelance Settings tool for the OPC Gateway.Check that resource ID in the Network Configuration match the resource ID specified in the Settings tool on the PC running the OPC Gateway.
In the Appendix A of the manual 3BDD012511-111_A_en_Freelance_Engineering_OPC_Server_F you will find an example how to connect from Excel to the OPC Server. The example uses Visual Basic for Applications (VBA) for Excel to communicate with the OPC Gateway.
Hope that helps.
Add new comment