GUI commands transition from R2007 to R2018
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello, I need to update data aquisition software from R2007 to R2018 and add PID controller. Script seems to work after transition from legacy based inerface to session based, but I have multiple errors when push bottons in gui:
Error using neurosys_4v5>DCLED_BUTTON_Callback (line 1051)
When using session based operations, use outputSingleScan.
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in neurosys_4v5 (line 41)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)neurosys_4v5('DCLED_BUTTON_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
Lines 1050 - 1053:
else
putsample(handles.out,[0 get(handles.DCLAMP_BUTTON, 'value')*str2double(get(handles.DCLAMP_VALUE, 'String'))...
handles.DC_OFFSET+0 handles.DC_OFFSET+0]);
end
Error using neurosys_4v5>loadstimulus (line 859)
When using session based operations, use outputSingleScan.
Error in neurosys_4v5>loadstimpushbutton_Callback (line 1072)
[handles] = loadstimulus(handles);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in neurosys_4v5 (line 41)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)neurosys_4v5('loadstimpushbutton_Callback',hObject,eventdata,guidata(hObject))
Lines 858-862:
else
putsample(handles.out,[0 get(handles.DCLAMP_BUTTON, 'value')*str2double(get(handles.DCLAMP_VALUE, 'String'))...
handles.DC_OFFSET+handles.L_gain*get(handles.tpl_checkbox,'Value')*handles.DCLED_ON*handles.DCLED-handles.DC_OFFSET*(handles.DCLED_ON > 0)...
handles.DC_OFFSET+handles.L2_gain*get(handles.tpl2_checkbox,'Value')*handles.DCLED_ON*handles.DCLED-handles.DC_OFFSET*(handles.DCLED_ON > 0)])
end
lines 1071-1073:
function loadstimpushbutton_Callback(hObject, eventdata, handles)
[handles] = loadstimulus(handles);
guidata(hObject, handles);
could you please tell where I can find any instructions how to update these commands & fix error messages for gui?
댓글 수: 0
채택된 답변
R
2024년 6월 13일
The issues are likely stemming from the switch from the older DAQ interface techniques (putsample) to the newer session-based interface in MATLAB, a change that occurred with versions released around 2016.
The commands have undergone some modifications, for instance, `outputSingleScan` is now used for executing a single sample DAQ session instead of `putsample(handles.out, [...])`. Thus, you should replace this with `outputSingleScan(handles.out, [...])`. For further details on the legacy functionalities, their new usage formats, and other relevant compatibility information, execute the command below in your MATLAB command window:
web(fullfile(docroot, 'daq/release-notes.html?searchHighlight=putsample'))
Additionally, for assistance in moving from the legacy to the session-based interface, consult the guide which lists the legacy functionality, new use format and other compatibility considerations at:
web(fullfile(docroot, 'daq/transition-your-code-to-session-based-interface.html?searchHighlight=Transition%20Your%20Code%20to%20Session-Based%20Interface'))
For documentation on `outputSingleScan`, refer to:
web(fullfile(docroot, 'daq/ref/outputsinglescan.html?searchHighlight=outputSingleScan&s_tid=doc_srchtitle'))
Also, as an important note, starting from R2020a, it is advised to utilize the DataAcquisition interface.
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Programming Utilities에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!