Candidate fixed module.
There’s a bit of a visual issue remaining that I don’t plan to fix. The output of the recorder()
function (and the view()
function, too) is a TransientDataset
, not a normal Dataset
. This type of dataset serializes to zero rows. It is intended to prevent bloated project resources when datasets are part of a component. This means that recorder() output will always show zero rows in the designer, even though they really are there in the gateway. Here’s an export of a set of tags testing and demonstrating this behavior. The Recording tag shows in the tag browser with zero rows, even though it ends up with twenty rows.
<Tags>
<Tag name="SimRecord" path="" type="Folder"/>
<Tag name="Delta" path="SimRecord" type="DB">
<Property name="Value">0.0</Property>
<Property name="DataType">4</Property>
<Property name="ExpressionType">1</Property>
<Property name="Expression">{[.]Source}-try({[.]Recording}[0, 'Source'], {[.]Source})</Property>
</Tag>
<Tag name="Recording" path="SimRecord" type="DB">
<Property name="Value">
<Dataset>
<columns>
<col name="t_stamp" datatype="DateTime"/>
<col name="Source" datatype="Float4"/>
</columns>
<rows>
</rows>
</Dataset>
</Property>
<Property name="DataType">9</Property>
<Property name="ExpressionType">1</Property>
<Property name="Expression">recorder(1000, 20, "Source", {[.]Source})</Property>
</Tag>
<Tag name="RecordingLen" path="SimRecord" type="DB">
<Property name="Value">20</Property>
<Property name="DataType">2</Property>
<Property name="ExpressionType">1</Property>
<Property name="Expression">len({[.]Recording})</Property>
</Tag>
<Tag name="Source" path="SimRecord" type="DB">
<Property name="Value">6.0</Property>
<Property name="DataType">4</Property>
</Tag>
</Tags>
For some reason, the rows do display in earlier Ignition versions, in spite of the TransientDataset return.