For CJ2 CPUs and CJ1 with Ethernet/IP, you can create Network Symbols to create cyclic data link communications. See CX-Programmer Help topic "Network Symbols" for details.
For CJ1M, CP1H and CP1L the next simplest method is to use automatic PC Link functionality of te Host Link port. Configure one machine as master and the other as slave (8 maximum) from the "PLC Settings" window in CX-Programmer.
Alternatively, more detailed data transfer can generally be written using the SEND and RECV PLC commands.