########### IO-Profiles ########### ================== What is IO-Profile ================== *IO-Profiles are part of the hvac-module* IO-profile is an XML file that contains modbus register information about specific modbus device (for example a ventilation unit). It holds a full list or a subset of registers and any parameters related to those registers, e.g. scaling, limits, offsets, etc. In other words it is a descriptor file that holds required information about a modbus device for Actiweb to be able to read and represent the data correctly. .. note:: Actiweb does not set a limit for how many IO-profiles can be stored in the device; there can be as many as are needed and then some. Disk space will never become a problem in regards of IO-profile amount stored on device. The same IO-profile can be used to read multiple unique modbus devices with the same modbus registers; it is not bound to one modbus address. ---------------------- What IO-Profile is not ---------------------- IO-Profile is not a general Modbus helper library. It does not hold any generic information to be used for other devices than the one it was specificly made for. IO-Profile is not a place to hold curves, schedules, PID parameters or any other such data to be generally used. ================= Using IO-profiles ================= IO-Profiles can be used in two ways: * Together with QuickSource and QuickTarget to automatically populate dataSources and dataTargets * Automatically creating points based on autocreate-attribute in IO-Profile ---------------------------- IO Profile schemas explained ---------------------------- When ``hvac`` module is installed it exposes two ioProfile schemas ioProfileInfo ^^^^^^^^^^^^^ ioProfileInfo schema point holds a list of currently available IO Profiles in the system. profileList items contain following properties: :description: Holds brief information about the IO-Profile :name: Name of the IO Profile. This will be used when referenced elsewhere :protocol: Protocol for the IO-profile. Usually either modbusrtu, modbustcp or modbusRTU :utilityType: Only used with mbus IO-profiles ioAutoCreateList ^^^^^^^^^^^^^^^^ ioAutoCreateList is used as a configuration point for point creation. Here you determine which ioPort will be used, pointPaths and the devices themselves. Final pointname will use following pattern: ``ioAutoCreate.pointPathPrefix + deviceList.pointPathPrefix + ioProfile.alias`` :commPort: Reference to the ioPort we want to used :pointPathPrefix: Prefix for the autogenerated point names. To create branch like structure, it's adivced to end the prefix with ``/``-character. :deviceList: :ioProfile: Name of the IO profile to be used :nodeAddress: modbusAddress of the device. Usually only useful with RTU protocol. ModbusTCP rarely takes advantage of the address field :pointPathPrefix: Another Point prefix. Will be concatenated to the earlier pointPathPrefix and the pointname from the IO-Profile ============================ QuickSource and QuickTargets ============================ Clicking ``quickSource`` or ``quickTarget`` in database view it will open up a dialog which lets user to choose parameters for automatically populating ``dataSource`` and ``dataTarget``. .. image:: /images/QuickTarget-example.png :Port: ioPort's ``alias`` that will be used :I/O Profile: Profile name that will be used :Bus Address: For modbusRTU based devices, the modbus address of the device :Channel: Name of the register to be used in dataUrls When ``quickUrl`` has been set (and database saved) the next time Actiweb9 is restarted, it will populate corresponding ``dataUrl`` with correct ioPort, modbuss address, register address and url-parameters to manipulate raw value to meaningful pv value. In above example image, the quickSource value is ``io://modbus1/ECBlue/247/MB1ADDR247ECBlueRTUSpeedControlOut``. With the information from the IO-Profile it will create dataSource value: ``modbusrtu://ioPorts%2FmodbusRTU%2FP1/247/holding/2?scale=1.0&hilimit=100&lowlimit=0&datatype=uint16`` ================================== Automatic Point Creation - Example ================================== Point autocreation can be initiated by populating ``ioAutoCreateList`` with proper information. In this example we're going to create points to control EC Blue fan in a modbusRTU. The fan has modbus address of 247 Start by locating ``ioAutoCreatelist`` in database. By default one such point is created in ``ioProfiles/auto`` First for ``commPort`` field, select ioPort for correct modbus bus. Then add a point prefix path for the future points. In this example prefix will be ``ioPoints/`` and ioPort is ``ioPorts/modbusRTU/P1`` Then edit ``deviceList`` by clicking it's field. A dialog will appear. Add following information: .. image:: /images/Autocreate-points.png Here ``ECBlue`` is the name of the IO-Profile, ``247`` is the modbuss address. pointPathPrefix will determine the middle part of the point name, here ``Puhallin1/`` .. tip:: In this example we only have one device on bus. You can add more devices to the same bus to be automatically created by clicking the green ``+`` Remember to use different addresses. Points can be created with the same pointPathPrefix if the created point names do not collide. Otherwise direct points to different branches in the database. When all information has been set, click ``Save Database`` on the top of tha page to make the changes persistent, and then press ``Restart``. Actiweb9 will now restart and create points determined in the ``ioAutoCreateList`` point. .. image:: /images/Autocreate-points-result.png .. tip:: If you have multiple modbus busses, you can create more ``ioAutoCreateList`` points for different ioPorts. Pointname for the ``ioAutoCreateList`` does not matter, but ``ioProfiles/`` is good default place to store them, if it's not otherwise required to keep them elsewhere.