Mitsubishi Electric CR750-Q Instruction Manual page 191

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

Act (Act)
[Function]
This instruction specifies whether to allow or prohibit interrupt processing caused by signals, etc. during
operation.
[Format]
Act[]<Priority No.> = <1/0/-1>
[Terminology]
<Priority No.>
<1/0/-1>
[Reference Program]
(1) When the input signal 1 turns on (set to 1) while moving from P1 to P2, it loops until that signal is set to 0.
1 Def Act 1,M_In(1)=1 GoSub *INTR
2 Mov P1
3 Act 1=1
4 Mov P2
5 Act 1=0
:
10 *INTR
11 IF M_In(1)=1 GoTo 110
12 Return 0
(2) When the input signal 1 turns on (set to 1)while moving from P1 to P2, Operation is interrupted and the
output signal 10 turns on.
1 Def Act 1,M_In(1)=1 GoSub *INTR
2 Mov P1
3 Act 1=1
4 Mov P2
:
10 *INTR
11 Act 1=0
12 M_Out(10)=1
13 Return 1
(3) When the input signal 1 turns on (set to 1)while moving from P1 to P2, Operation is interrupted and wait
until the signal 0 turns on then return to the first step of the program.
1 *Start
:
11 Def Act1, M_In(1)=1 Goto *INTR2
12 Mpv P1
13 Act 1=1
14 Mov P1
:
21 *INTR2
22 Act 1=0
23 *Loop
0: Either enables or disables the entire interrupt.
1 - 8: Designate the priority No. for the interrupt defined in the Def Act statement.
When entering the priority No., always leave a space (character) after the Act command.
If described as Act1, it will be a variable name declaration statement.
1: Allows interrupts
0:Prohibits interrupts.
-1: If the <Priority No.> is 1 to 8, the interrupt in progress is canceled.
And interrupt monitoring function is stopped.
'Assign input signal 1 to the interrupt 1 condition
' Assign input signal 1 to the interrupt 1 condition
' Enable interrupt 1.
' Disable interrupt 1.
'
' Loops until the M_In(1) signal becomes 0.
'
' Enable interrupt 1.
' Disable interrupt 1.
' Turn on the output signal 10
' Returns to the next step which interrupted
'Assign input signal 1 to the interrupt 1 condition
' Enable interrupt 1.
' Disable interrupt 1.
Detailed explanation of command words 4-171
4MELFA-BASIC V

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents