Echelon NodeBuilder FX/PL Examples User Manual
Page 39
NodeBuilder FX/PL Examples Guide
31
5. Open
the
Wheel functional block’s Mandatory NVs folder. Right-click the nvoValue network
variable and select Properties from the shortcut menu. The NV Properties dialog opens.
6. Set
NV Type to SNVT_lev_percent and Name to nvoWheel.
7. Right-click
the
Wheel functional block’s Optional CPs folder and select Implement Optional
CP from the shortcut menu. The Implement Optional CP dialog appears.
8. Implement
the
nciGain configuration property. Name the new configuration property
cpWhGain. Set Initializer to {1,1}. This configuration property holds the gain value between
the physical input and the nvoWheel network variable.
9. Right-click
the
Wheel functional block’s Optional CPs folder and select Implement Optional
CP from the shortcut menu. The Implement Optional CP dialog appears.
10. Implement the nciLocation configuration property. Name the new configuration property
cpWhLocation. This configuration property holds the location of the sensor device.
11. Right-click the Wheel functional block’s Optional CPs folder and select Implement Optional
CP from the shortcut menu. The Implement Optional CP dialog to appears.
12. Implement the nciOverBehave configuration property. Name the new configuration property
cpWhOvrBehave. Set the Initial Value field to OV_RETAIN. This configuration property
determines the override behavior of the device. See the L
ON
M
ARK
SNVT and SCPT Master List
for more information about the SCPTovrBehave configuration property.
13. Right-click the Wheel functional block’s Optional CPs folder and select Implement Optional
CP from the shortcut menu. The Implement Optional CP dialog appears.
14. Implement the nciOvrValue configuration property. Name the new configuration property
cpWhOvrValue.. This configuration property determines the override value of the device. See
the SCPTovrValue configuration property in the L
ON
M
ARK
SNVT and SCPT Master List for
more information.
15. Right-click the Wheel functional block’s Optional CPs folder and select Implement Optional
CP from the shortcut menu. The Implement Optional CP dialog appears
16. Implement the nciMaxSendT configuration property. Name the new configuration property
cpWhMaxSendT. Set Initializer to {0,0,0,0,0}. This configuration property determines the
maximum time between network variable updates for the functional block (the heartbeat).
17. Right-click the Wheel functional block’s Optional CPs folder and select Implement Optional
CP from the shortcut menu. The Implement Optional CP dialog appears.
18. Implement the nciMinSendT configuration property. Name the new configuration property
cpWhMinSendT and set Initializer to {0,0,0,0,0}. This configuration property determines the
minimum time between network variable updates for the functional block (the throttle).
19. Right-click the Wheel functional block’s Optional CPs folder and select Implement Optional
CP from the shortcut menu. The Implement Optional CP dialog appears.
20. Implement the nciOverValue configuration property. Name the new configuration property
cpWhOvrValue. This configuration property determines the override value for the nvoWheel
network variable.
21. Click Generate and Close.
22. Open the Wheel.nc file from the Source Files folder. Add the Cp2Tick() utility function and a
when statement to handle I/O processing as shown below:
unsigned long Cp2Tick (const SNVT_elapsed_tm *const pSnvt) {
unsigned long ulResult;
ulResult = ((pSnvt->minute * 60UL) + pSnvt->second)
*
(1000UL/WHEEL_HBCORE)
+ (pSnvt->millisecond / WHEEL_HBCORE);
return
ulResult;