TcOpen
TcOpen copied to clipboard
Write fast data as DAQ
- Implement a buffer for fast data to transmit to the IVC in order to avoid missing data due to the non deterministic task in the C# client. Could be implemented the same way as logger ?
Pat
/cib
Branch 398-Write_fast_data_as_DAQ created!
In case of DAQ the type of data is unknown, buffer needs to be filled in byte and casted in Connector ? Maybe get the sizeof on DAQ struct . The size returned by sizeof() gives the right value. Proof :
Hmm... yeah this is where the generics in the PLC would come in handy... never thought of this approach we may give it a try... we would need then parse the object somehow in .net. (from bytes to concrete objects).
Another possible approach is the one we use TcoDataExchange
(abstract block) needs concrete implementation, that requires the implementation of _data member that then contains data...
https://docs.tcopengroup.org/articles/TcOpenFramework/TcoData/Introduction.html#getting-started
_data we then work with the _data object on .net side.
A similar approach could be used here where _data would be an array and we could treat it as enumerable when retrieving the data from the buffer.
@PTKu I pushed a draft of the TcoDaq in order to open the discussion about the name of files, interface and implementation.
@PTKu , The new commit goes further in the concept.