주요 콘텐츠

이 페이지는 기계 번역을 사용하여 번역되었습니다. 영어 원문을 보려면 여기를 클릭하십시오.

MATLAB에서의 통신

A2L 파일을 사용하여 XCP 클라이언트와 서버 모듈 간에 XCP를 통한 통신을 허용합니다.

A2L 파일은 ECU 구현을 정의하는 특수한 설명 파일입니다. A2L 파일의 정보는 XCP 클라이언트가 XCP 연결을 통해 서버 모듈과 통신할 수 있도록 합니다. 서식화된 텍스트 파일에는 이벤트 및 메저먼트 정의와 기타 구성 정보가 포함되어 있으며, 데이터 수집 및 자극 수행과 기타 기능 실행에 사용됩니다.

CAN을 통해 XCP 서버와 통신하려면 A2L 파일(ECU 설명 파일)에 최소한 다음 속성 정보가 포함되어야 합니다:

  • ProtocolLayerInfo

  • TransportLayerCANInfo

  • Measurements

  • DAQInfoEvents

    • MATLAB®: 동적 DAQ 목록 기능을 사용할 경우 DAQInfoEvents 콘텐츠가 필요합니다.

    • Simulink®: XCP CAN Data Acquisition 블록이 동적 DAQ 목록 기능을 사용하기 때문에, DAQInfoEvents 콘텐츠가 필요합니다.

CAN 프로토콜을 사용하여 XCP 클라이언트를 서버 모듈에 연결할 수 있습니다. 이를 통해 서버 모듈에서 이벤트를 사용하고 메저먼트에 액세스할 수 있습니다. XCP 데이터베이스 및 통신 워크플로를 따라 XCP를 사용하여 장치에 연결하는 방법을 확인하십시오.

서버 모듈의 메모리를 직접 읽거나 쓸 수 있습니다. 또는 동적 데이터 자극 목록을 생성하고 메저먼트를 목록에 할당한 다음, 수집된 DAQ 데이터를 읽고 자극 데이터를 씁니다.

함수

모두 확장

xcpA2LA2L 파일 액세스
getCharacteristicInfoGet information about specific characteristic from A2L file
getMeasurementInfoGet information about specific measurement from A2L file
getEventInfoGet event information about specific event from A2L file
xcpChannelCreate XCP channel
connectConnect XCP channel to server module
disconnectDisconnect from server module
isConnectedConnection status
readCharacteristicRead and scale specified characteristic value from direct memory
writeCharacteristicScale and write specified characteristic value to direct memory
readMeasurementRead and scale specified measurement value from direct memory
writeMeasurementScale and write specified measurement value to direct memory
readAxisRead and scale specified axis value from direct memory
writeAxisScale and write specified axis value to direct memory
readSingleValueRead single sample of specified measurement from memory
writeSingleValueWrite single sample to specified measurement
createMeasurementListCreate measurement list for XCP channel
viewMeasurementListsView configured measurement lists on XCP channel
freeMeasurementListsRemove all measurement lists from XCP channel
startMeasurementStart configured DAQ and STIM lists
isMeasurementRunningIndicate if measurement is active
readDAQRead scaled samples of specified measurement from DAQ list
readDAQListRead samples and times of specified measurement in DAQ list (R2024a 이후)
readDAQListDataRead samples of specified measurement from DAQ list
writeSTIMWrite scaled value of specified measurement to STIM list
writeSTIMListDataWrite to specified measurement
stopMeasurementStop configured DAQ and STIM lists

속성

모두 확장

xcp.A2L PropertiesProperties of the xcp.A2L file object
xcp.Channel PropertiesProperties of the xcp.Channel object

도움말 항목

하드웨어 연결

메모리에 데이터 읽기 및 쓰기

메저먼트 수집 및 자극

추천 예제