4MELFA-BASIC IV
Detailed explanation of Robot Status Variable
4-288
M_Out/M_Outb/M_Outw
[Function]
Writes or references external output signal.
M_Out:Output signal bit.
M_Outb:Output signal byte (8 bits).
M_Outw:Output signal word (16 bits).
[Format]
[Terminology]
<Numeric Variable>
Specifies the numerical variable to assign.
<Equation>
Specify the output signal number.
0 to 255 : Standard remote outputs.
900 to 907 : Hand output.
2000 to 5071 : Output signal of PROFIBUS.
6000 to 8047 : Remote output for CC-Link.
<Time>
Describe the output time for the pulse output as a constant or numeric opera-
tion expression. Unit: [Seconds]
[Reference Program]
1 M_Out(2)=1
' Turn ON output signal 2 (1 bit).
2 M_Outb(2)=&HFF
' Turns ON 8-bits starting from the output signal 2.
3 M_Outw(2)=&HFFFF
' Turns ON 16-bits starting from the output signal 2.
4 M4=M_Outb(2) AND &H0F
' M4 will contain the 4-bit information starting from output signal 2.
[Explanation]
(1) This is used when writing or referencing external output signals.
(2) Numbers in 900's will be used as I/O signals for the hand.
(3) Numbers 6000 and beyond will be referenced/assigned to the CC-Link (optional).
(4) Refer to
Dly (Delay)" for the explanation of pulse output.
M_PI
[Function]
Returns pi (3.14159265358979).
[Format]
[Terminology]
<Numeric Variable>
Specifies the numerical variable to assign.
[Reference Program]
1 M1=M_PI
' 3.14159265358979 is assigned to M1.
[Explanation]
(1) A variable to be assigned will be a real value.
(2) This variable only reads the data.
Example)M_Out(<Equation>)=<Numeric Variable>
Example)M_Outb(<Equation>)=<Numeric Variable>
Example)M_Outw(<Equation>)=<Numeric Variable>
Example)M_Outw(<Equation>)=<Numeric Variable> Dly <Time>
Example)<Numeric Variable>=M_PI