Unity Pro with M340 P34 2020 (Forcing Analog Points, Simulator, ClearSCADA) Questions

rnishimura

Member
Join Date
Feb 2009
Location
San Diego
Posts
1
I am familiar with RSLogix, Concept, and Telepace, but have not used Unity Pro S until the past few weeks and have a few issues I have not been able to get around yet and I was looking to see if anyone has any tips.

1) Is there a way to force Analog points (%MW and/or %IW) in the simulator mode? I know when you are connected to the physical Processor I can go to to the AI module to force the points. But I have not figured out how to force Analog points in the memory or when not connected to the processor. I have tried created an IODDT as type T_ANA-IN_BMX assigned to %CHr.m.c and tried toggling the FORCING_ORDER to 1 and setting a value to CMD_FORCING_VALUE, but it does not seem to have any affect on the Analog Input.

2) I cannot figure out how to connect to a simulator on another PC. The documentation states that you can connect to a simulator that is running on another PC using TCP. If I try to set Unity to use Simulation Mode and set the IP Address to the remote PC running the simulator I get the following message "This isn't a valid PLC Address, or PLC is busy, or media is off." I have also tried explicitly specifying port 502 without different results. I am think the simulator may possibly be running on a different port, but I was not able to find simulator settings to specify it. Has any been successful at connecting to a simulator running on a different PC?

3) This installation is being installed with Schneider Electric's ClearSCADA HMI software. I have installed ClearSCADA with Schneider Electric's SCADAPacks in the past and am somewhat familiar with the software. In ClearSCADA I have set up an Advanced Modbus Direct Channel, Advanced Modbus Direct Outstation Set, and an Advanced Modbus Generic Modbus Direct Outstation. I have attempted to connect ClearSCADA to the PLC Simulator (on the same PC as Unity Pro) by setting the TCPIP address to the PC address running Unity Pro. However, I have not found anywhere on Unity to specify the Modbus Address of the PLC. Am I missing a setting here?

Thanks in advance for any help,
Ryan
 
G'day.
First post here, sorry if it's not clear.

1. Use Write_INPUT_Ebool and write_input_int to to force values on defined inputs. Ensure that the code that uses the write_ functions is executed before you use the result of the write in the code. (Put them first up the tree in the 'explorer' view)
can do it in ST like this or FB if you want.
IF Sim THEN
DigitalInput := WRITE_INPUT_EBOOL (INP := DEBUGState );
AI.Value := WRITE_INPUT_INT (INP := DEBUG_AI_Raw );
End_If;



2. The simulator should be on the address 127.0.0.1 as usual, but the ClearSCADA will see it if it points to the IP address of the PC running the Unity simulator.

3. No idea, love to know though. If you find out about the modbus stuff that would be great. Just did a project using Kepware (as bundled with ClearSCADA) to find that the license is not available from schneider, KEPWare no longer support the version bundled with ClearSCADA, and the update tool doesn't work, so we need to manually update all the OPC tags to modbus tags.


Hope this wasn't too late.
Cheers
 
2) I cannot figure out how to connect to a simulator on another PC.

It should be on port 502 on the remote simulator. Is there a firewall running on the simulator machine? Assuming all the network settings are consistent, then check this first.

There are some network commands you can run on the simulator machine to verify if the service is even listening on this port - from memory, it should be

netstat -p tcp -n -a

You'll want to look for 502, the listening port. If it's listening, but you can't connect, check firewall. If still nothing, Wireshark will then give indication as to what is happening.


3) I have attempted to connect ClearSCADA to the PLC Simulator (on the same PC as Unity Pro) by setting the TCPIP address to the PC address running Unity Pro. However, I have not found anywhere on Unity to specify the Modbus Address of the PLC. Am I missing a setting here?

I don't think you really do with ModbusTCP. Use 255 or zero as the Modbus ID. Note that depending on the ethernet module on the M340 you could have some issues - some of the newer devices won't work with 255, so I usually just use zero.
 

Similar Topics

Greetings, I'm new at PLC programming, but good a logic - so I thought. I've inherited a PLC system, which is presently operating in the field...
Replies
6
Views
2,477
If I am disconnected from M340, I cant see the Values. Unlike RSLogix when one gets to choose upload state values upon exit, and these state...
Replies
4
Views
2,249
I am trying to make a function that count the number of True BOOL inn a specific Array and return the count to an INT AlarmArrayActiveAlarms. I...
Replies
8
Views
4,402
Hello all, My company have sourced a Modicon M340 PLC with a Magelis (XPT GTO4310) HMI. The intention here is to use this setup in order to...
Replies
6
Views
3,684
I am having trouble with creating a shift register in Unity Pro on my Schneider M340. I am using the FFB SHR to try and get this to work. I have...
Replies
13
Views
5,062
Back
Top Bottom