I'm not familiar with citect, but the process will be exactly the same as if communicating with a real M340. Are you using Schneiders OFS package as your IOserver? If so, these are the steps I'd follow:
* load your program into the simulator and set it running
* Export XVM file of unity tags
* set up OFS as per normal using the XVM file as the tag database. Note that the target machine will have an IP address of 127.0.0.1 when running the simulator in the same machine as OFS
if you're not using OFS and are just using a standard modbus TCP driver, then simply start the simulator, load your program and point citects Modbus tcp ioserver at 127.0.0.1
note that you need to have state ram enabled in unity to be able to use modbus style addressing. See the unity help file for how to do this.