Depending on the project at hand, sometimes there is a need to rely on Time table and schedule functionality. Especially in building applications, but can be practical in lots of situations.
Because this is really well integrated in the Emalytics (Niagara) framework (which we have on the ILC2050 BI controller), I decided to make a makersblog where I explaine the functionality of this and integrate the output of this schedule/calendar function into the AXC F 2152 via Modbus TCP.
ILC 2050 Part:
Open your station and create a new folder under the config folder. Simply rightclick on Config->New->Folder
We call this folder “SchedulerPLCnext”.
When this is done, pleas click on the folder icon in the Palette sidebar and search for ‘schedule’. If found doubleclick it.
Here you get several Schedules you can chose from Boolean (True/False = 0/1 as output values) and Numeric (integer value as output) are the mostly used ones. Just drag and drop these onto the Wire Sheet of the SchedulePLCnext folder we created earlier.
Then please doubleclick the boolean schedule.
Here you get an overview of your weekly schedule that you can decide from when to when the output must be set True/False, Also special events are possible ( for example Holidays,..) and an overview of the whole calendar( summary).
When all of this is done to your liking, we should then only need to communicate this data via Modbus TCP to the PLCnext.
Therefor we search in the palette folder ( like we searched for the Schedule) , but now we look for ModbusTcpNetwork.
Drag and drop this under the Drivers folder like in the picture underneath, doubleclick on it and select the New button at the bottom of the page.
We’d like to add a new Modbus Tcp Device, so just click OK.
When this is done click right on the points folder under this ModbusTcpDevice and do
New -> BooleanWritable
New -> NumericWritable
This should give you the following result.
The datapoints we now created will be the ones we are going to transfer to the PLCnext controller via modbus TCP.
Upto now we didn’t link the outputs from the schedules to the modbus points, so that is exactly what we will do next.
Right click the Boolean schedule we made and select Link Mark.
Then click on the BooleanWritable0 we created in the Modbus Tcp driver points folder and do a rightclick here , select Link From ‘BooleanSchedule’
This means the data is linked/connect.
Last step in the Niagara is then to double click on the BooleanWritable0 and click in the right upper corner of your screen on the AxProperty sheet.
In this sheet you define the Point his Data Adress ( like you see I used 30 as an example and it is set as a coil)
Please redo the above 4 lines as well for the NumericWritable value ( link this to the Schedule we made and I use the Modbus register 31 for this).
PLC next Part:
Please start from a new project and add the Modbus_TCP_6 library.
With this library you can have acces to the MB_TCP_Client, and all the Function codes to set up this communication.
As example I used the FC3 (read registers) and used it to get the data out of the NumericWritable value ( = the value comming out of the output from the Numeric Schedule).
I hope this example gives you a look on possibilities how to combine different controllers/functionalities and really use the “best of both worlds principle”.
Off course there are other ways of integrating Schedules, but probably not everyone has seen the insides of the Schedule in the ILC2050 BI that has a lot of potential usage.
Leave a Reply
You must be logged in to post a comment.