forked from thiagoralves/OpenPLC_Simulink-Interface
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.cfg
More file actions
74 lines (67 loc) · 2.29 KB
/
interface.cfg
File metadata and controls
74 lines (67 loc) · 2.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Interface configuration file for SimLink - 2016
#
# This is the configuration file for the SimLink Interface program
# used in conjunction with the OpenPLC and the Simulink application.
# In order to send and receive data between the Simulink and the
# OpenPLC stations, SimLink needs to know the IP address for the
# machine running the Simulink application and also information
# about the exported variables for each OpenPLC station.
#
# To add variables to one station, type the name of the station
# followed by the command "add" plus the type of variable you
# want to be added. The number after the "=" sign is the UDP
# port used by the simulink UDP connection to send or receive
# the variable. Ex: station0.add(digital_out) = "10001"
#
# The variables added to the station will be connected to the
# OpenPLC buffer in the order they appear. Therefore, the first
# digital_out will be connected to OpenPLC %QX0.0 (coils buffer
# at position 0.0). The second digital_out will be %QX0.1 and so on...
#
# Different types of variables (digital_out, analog_in) are
# connected to different buffers. Therefore if after the two
# digital_out's mentioned above there is a analog_in, it will
# be connected to %IW0 (analog input buffer position 0)
num_stations = "5"
comm_delay = "100"
# ------------
# SIMULINK
# ------------
simulink.ip = "192.168.171.1"
# ------------
# STATION 0
# ------------
station0.ip = "192.168.171.139"
station0.add(digital_out) = "10001"
station0.add(digital_out) = "10003"
station0.add(analog_in) = "10002"
station0.add(analog_in) = "10004"
# ------------
# STATION 1
# ------------
station1.ip = "192.168.171.140"
station1.add(digital_out) = "20001"
station1.add(digital_out) = "20003"
station1.add(analog_in) = "20002"
# ------------
# STATION 2
# ------------
station2.ip = "192.168.171.141"
station2.add(digital_out) = "30001"
station2.add(digital_out) = "30003"
station2.add(analog_in) = "30002"
# ------------
# STATION 3
# ------------
station3.ip = "192.168.171.142"
station3.add(digital_out) = "40001"
station3.add(digital_out) = "40003"
station3.add(analog_in) = "40002"
# ------------
# STATION 4
# ------------
station4.ip = "192.168.171.143"
station4.add(digital_out) = "50001"
station4.add(digital_out) = "50003"
station4.add(analog_in) = "50002"
station4.add(analog_in) = "50004"