I need to know is there a way to call session specific functions from simulink?
I need to take positional encoder reading into simulink. I added the session creation and channel creation commands in model call backs so that every time a session is automatically created and channels are defined. This was NI Daq session is created in the workspace. Now i want to invoke the following function from simulink and do post processing in simulink model:
s = daq.createSession('ni'); %% command defined in model call back
ch = addCounterInputChannel(s, 'Dev1', 0, 'Position'); %% command defined in model call back
Through this command i get encoder position in matlab command window. I am using NI USB DAQ 6343 with US Digital E4T optical encoder.
I have tried Matlab function block, however it cannot do that.