WriteMC
The WriteMC function creates an SLMP connection to the Mitsubishi PLC and Motion Controller (MC), and sends a Batch Write command using a 3E QnA compatible or a 1E A compatible Binary frame to write data from the PLC/MC.
WriteMCInputs
Syntax: WriteMC(Event,Host Name,Port,PLC Series,Device Address,Timeout,Buffer)
Parameter | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Specifies the update event on which to readdata. This parameter must be a reference to one of the following:
|
|||||||||||
Specifies the IP address of the Mitsubishi PLC/MC to which data is written. |
|||||||||||
Specifies the port number of the SLMP server which is open on the MELSEC EtherNet module. |
|||||||||||
Specifies the message frame that the data packet will be encapsulated.
|
|||||||||||
Specifies the memory location of the Mitsubishi PLC to which data is written. |
|||||||||||
Specifies the amount of time, in milliseconds(5 to 30000; default = 1000ms), that the functionwill attempt to transmit data before execution is halted and an #ERRis returned. |
|||||||||||
Specifies a referenced Buffer structurecreated by the FormatOutputBuffer function,which defines how the received data is interpreted.For more information, see FormatOutputBuffer. Note: When iQ-R/Q/L Series, iQ-F Series or iQ-F/R/Q/L Series is the selected PLC Series, the total maximum length for input data is 1920 bytes.When FX Series is the selected PLC Series, the total maximum length for input data is 128 bytes.
|
WriteMCOutputs
Returns |
The number of elements written or #ERR if an input parameter is invalid. |