Table of Contents
16
21. Counter instructions...............................................................................701
CT_FB Down Counter
702
CT Counter
705
F118_UDC UP/DOWN counter
708
22. Data transfer via communication ports ................................................711
22.1 Description of the communication modes..............................................................................712
22.2 Setting the communication parameters .................................................................................714
22.2.1.1 Setting the CPU's COM Ports in PROG Mode via System Registers .................................714
22.2.1.2 Setting the CPU's COM Ports in PROG Mode via DIP Switches (FP10SH) .......................715
22.2.1.3 Setting in RUN Mode with SYS instructions (FP-Sigma, FP-X) ..........................................717
22.2.1.4 Changing the communication mode in RUN mode..............................................................717
SetCommunicationMode Switch communication mode between 'Program
controlled' and 'MEWTOCOL-COM'
718
22.3 Getting the communication mode ..........................................................................................724
22.3.1 Checking for PLC link mode ..........................................................................................................724
IsPlcLink Evaluation of "PLC Link" flag for all ports
725
22.3.2
Checking for program controlled mode .........................................................................................725
IsProgramControlled Evaluates the "program controlled" flag
726
22.3.3
Checking for MEWTOCOL-COM master / slave mode.................................................................726
F161_MRD_PARA Getting the communication modes in RUN mode from
MCU's COM port
728
F161_MRD_STATUS Getting the statuses in RUN mode from MCU's COM
port
730
22.3.3.1
Getting the communication modes and statuses via the input (X) flags from the MCU's COM
ports in RUN mode ..............................................................................................732
22.4 Data transfer in program controlled mode .............................................................................733
22.4.1 Sending data to external devices ..................................................................................................733
SendCharacters Send characters to CPU or MCU port
738
SendCharactersAndClearString Send characters and clesr string
740
F159_MTRN Serial data communication to CPU or MCU port
742
22.4.1.1
Format of send and receive data .........................................................................................745
22.4.2 Receiving data from external devices ...........................................................................................747
ReceiveData Receive data from CPU or MCU port
751
ReceiveCharacters Receive characters from CPU or MCU port
753
ClearReceiveBuffer Reset the receive buffer
754
F161_MRCV Read serial data from the MCU's COM port
756
22.4.3
Flag operation in program controlled communication ...................................................................757