TcOpen icon indicating copy to clipboard operation
TcOpen copied to clipboard

Write fast data as DAQ

Open patopat opened this issue 2 years ago • 6 comments

  • 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

patopat avatar Apr 02 '22 15:04 patopat

/cib

patopat avatar Apr 03 '22 07:04 patopat

Branch 398-Write_fast_data_as_DAQ created!

github-actions[bot] avatar Apr 03 '22 07:04 github-actions[bot]

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 : image

patopat avatar Apr 03 '22 09:04 patopat

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 avatar Apr 04 '22 07:04 PTKu

@PTKu I pushed a draft of the TcoDaq in order to open the discussion about the name of files, interface and implementation.

patopat avatar Apr 04 '22 11:04 patopat

@PTKu , The new commit goes further in the concept.

patopat avatar Apr 04 '22 13:04 patopat