Справочник Пользователя для Mitsubishi Electronics MR-MC210

Скачать
Страница из 658
 
 
6 - 118 
6. APPLICATION FUNCTIONS 
 
6.30.4 Operation example 
(1) Continuous detection mode 
The mark detection counter is incremented at mark detection. After mark detection, read the mark detection 
data and update the read complete buffer number. When mark detection data is not read before the next 
mark detection, a mark detection write/read error (operation alarm A6, detail No.01) occurs, followed by a 
rapid stop. 
 
Example: When both ON/OFF edges are enabled. 
Data 2
Data 3
Data 0
Data 1
No data
3
4
1
2
0
0
1
3
2
4
Mark detection data
Read complete buffer
number
Get mark detection data
sscGetMarkDetectionData function
Mark detection signal
Wait for interrupt event
sscWaitIntEvent function
Mark detection interrupt
(iMAK   )
Mark detection counter
 
 
 
POINT 
 
• Mark detection interrupt cannot be used for interface mode. The mark 
detection counter can be continuously monitored by polling. 
 
API LIBRARY  
• Use the sscGetMarkDetectionData function to get mark detection data. 
• The read number setting for the read complete buffer number is conducted 
within the sscGetMarkDetectionData function therefore user program 
processing is not required. 
• Use the sscGetMarkDetectionCounter function to get the mark detection 
counter. 
• When using mark detection interrupt, use the sscWaitIntEvent function and 
wait until interrupt is output. If not using mark detection interrupt, use polling. 
When using polling, use the sscGetMarkDetectionCounter function to 
periodically check that the mark detection counter is updated.