Filter löschen
Filter löschen

how to aquire xPC data in a triggered manner

3 Ansichten (letzte 30 Tage)
Istvan
Istvan am 4 Feb. 2014
Kommentiert: Istvan am 11 Feb. 2014
Hello,
I would like to log some signals in xPC, preferentially to file using xPC file-scope. However, I would like to log data only at the occurrence of a trigger signal and would very muck like to have one file per trigger event (i.e., each time the trigger goes high, make a new file called like xxx001.dat and log data until trigger gets low. At second trigger event log to xxx002.dat and so on).
Dividing the recorded data is essential as logging everything to one file would make this file huge (!) and make data extraction difficult too...
Any ideas how I can do so? Alternatives would help me too.
Thanks in advance.

Akzeptierte Antwort

Suneesh
Suneesh am 10 Feb. 2014
1 "have one file per trigger event": For this I am not able to think of a way apart from having several File Scope blocks each of them getting triggered at a different point in time.
2. If your main concern is having files that are too big then maybe you can use 'Dynamic file name enabled'. This enables splitting the files. Look for 'Dynamic file name enabled', 'Max file size in bytes' and AutoRestart in:
  4 Kommentare
Suneesh
Suneesh am 10 Feb. 2014
Bearbeitet: Suneesh am 10 Feb. 2014
The only other solution I can think of is to write your own C MEX S-Function which internally uses C commands like FOPEN etc to write to files. I feel you can name the files in you code as well. If you are not familiar with S-Functions this is not going to be trivial.
Istvan
Istvan am 11 Feb. 2014
Right, thanks :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by