Citect ,M340 Communication

obi1987

Member
Join Date
Jan 2014
Location
lahore
Posts
114
I am new with Citect and I want to communicate with M340 Simulator.Currently I don't have the Hardware so I am testing my logic in simulator.Now How i can communicate with the M340 Simulator and also test my Scada.
 
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.
 
I used M340 Modbus TCP Driver.
I just load the program in simulator and run it.Any Ethernet module need to be configured.I think its not required but for Confirmation?
Citect side I create I/O device with M340 Modbus TCP driver and assign the IP of my local device.
Even when I start Citect on simulator I am able to see one client is connected with the Simulator.But I am unable to get any value in Citect.
PLC I used address like Ix0.1.0 and IW0.4.0
In Citect What address format I have to used?
I used like 100001 and %M0 but still not getting any value.
 
I think you do need to set up the ethernet channel properly. The IP address doesn't matter for now, as the simulator will respond to any connection to the local loopback address. See first screenshot. Create an Ethernet channel in the communications tab in unity, and associate it with the ethernet port on your processor. The network symbol should look like the one in the screenshot, if it's got any red in it then you're not set up properly.

Next, go to the processor in the PLC configuration and check the Configuration tab. Select "Mixed Topological & State Ram" radio button, see second screenshot. Put some numbers in for each type and you should be away.

Now for example if you write a number to %MW0, it should be readable from modbus address 400001. 0x addresses map to %M, 3x addresses to %IW and 1x addresses to %I.

unity_network.jpg unity_state_ram.jpg
 
If you use the Modnet30 driver in Citect then the addresses are formatted the same as the plc (%MWxxx)
I think you need to set up the IP address for the driver in Citect to be the IP address of the Unity pc, even if on the same pc I think it has to be set to the IP address of the PC ethernet port (not just 127.0.0.0)
 
Thanks Saffa & GeoffC
But still unfortunately I am unable to communicate with PLC Simulator.
I did all things what you advised.
I attach the All images with Number to show the sequence of things I do in PLC and Citect.

1.jpg 2.jpg 3.jpg 4.jpg 5.jpg
 
On the IO device setup screen you have selected memory mode - this disables comms to an external device and uses internal memory. You need to deselect this.
Also not sure if you can use a NOE in the simulation, I would (for the test) change the CPU to one with on board ethernet (BMX P342020)
If you could load citect on to another pc you may have more luck not sure how citect will handle having the ioserver and the io device both with the same ip address
 
Geoff raises some good points there, and since I don't know anything about Citect I'd follow his advice for that component.

I have used the simulator successfully one a networked machine, but it does mean that you need to ensure port 502 is not blocked by a firewall. It should be simple to run on the same machine.

I just did a little test with Vijeo designer (its not the same i know, but the concept is) and it only works when using 127.0.0.1 as the IO server address. I even tried the actual IP of my laptop (as shown in the Unity simulator panel) and it didn't work. We do have very restrictive firewall policies and I know that port 502 is blocked from external connections on this machine, but no ports are blocked on the 127.0.0.1 loopback / localhost address so that should always work for you when the simulator and Citect reside on the same machine.
 
PLC Side Addressing is OK as I done in Image 1.

I will install Citect on other system and will try again then also change the Processor so i can able to figure out the issue.
 
I install citect on other system and I am able to communicate.:)
No need for built in Ethernet processor.It works with BMX 1000.
One more question.I have bit confusion between I/O addressing.

Whenever I used % Ix0.1.0 then I am able to see that Tag on the I/O Card Also.
But if I use %M0,%M1 etc this is not shown on the I/O card.
My question is that is this % MO ,%M1 pointing to real I/O or I have to map them in Program and then Use? like
%M0=Test1=%0.1.0

Thanks for both of you Saffa & GeoffC.
 
%M bits are internal memory bits. You decide what their value is, I.e. assigned to the value of an input or output, or the result of several logic instructions.

Normally I do not map any SCADA tags directly to real IO. I copy them to memory bits first and align that with any other memory bits From calculations etc in a continuous address range to make read operations from the SCADA or HMI more efficient
 
how to label your variable tag in citect

Hello Expert,
I am working on a project that will interface Modicon M340 Plc and Citect version 7.4.
I have tested my PLC program and it is working fine.
Also I have setup my citect server and the configuration is fine.
My challenge is the I/O addressing.
Kindly assist me on how I will enter my input and output address which I have on my M340 in the citect server variable tage.
for example,
How to label the input (%10.1.32) in my citect variable tag.
Also how to label the output (%Q0.2.22) in my citect variable tag.
 

Similar Topics

hello everyone,, i want to communicate citect scada v7.2 with modicon m340 plc via ethernet....i don know where to assign all...
Replies
0
Views
2,893
Dear all, In one of my project i am using 5no. M340 PLC in network which are communicating with Vijeo Citect 7.1 scada.My problem is that the...
Replies
0
Views
3,382
I recently posted about opc server Communication Failure with My PLC. I have now decided to change the approach. I am now connecting Modicon M340...
Replies
1
Views
4,370
please what are the steps can i do in vijeo citect to communicate to plc m340 ? with details please ....
Replies
5
Views
4,789
Hey there all! First of all, i really enjoy this forum. Allways friendly people to help beginners like myself! :D This is my first Modicon...
Replies
13
Views
12,354
Back
Top Bottom