Gateways and Energy Servers
Schneider Electric support forum to share knowledge about product selection, installation and troubleshooting for EcoStruxure Panel Server, PowerTag, Com'X, Link150…
User | Count |
---|---|
82 | |
46 | |
28 | |
28 |
Link copied. Please paste this link to share this article on your social media post.
Second time I'm getting this question this month so here it is: today, the iEM2010 or iEM2000T do not have any standard driver in the Can2Go box when connected through a smartlink.
The only drivers available are the Reflex, the ACT24 contactor and the iOF+SD24 breaker. In addition, you need to know that these drivers are "read-only". In other words in 2.11, you cannot control those devices with the current drivers (this will change soon in a firmware upgrade though).
So how do you deal with other devices? In this article, we'll describe how to read the basic pulse meters.
First you need to connect the meters. Note that you can connect two meters to one smartlink channel (noted as i1 and i2). You cannot use the standard smartlink cable, so in order to connect your meter, take a standard cable and cut it in half.
Your cable will look like this:
Connecting this to the meter can be done like this:
The other piece of the cable obviously goes in the smartlink.
Make sure you define a modbus id for the smartlink through the dials on the right on the smartlink:
The baud rate and parity will be automatically detected so you don't have to worry about it.
Then you need to make sure to enable modbus on your Can2Go box. Once logged in, select the box in the tree structure and go to Modbus Configuration:
ok, great! Now we just have to write our driver. Click the "Add Object" icon in the explorer tab (first icon).
and add a Lua script.
The scripting is real easy:
-- -----------------------------------------------------------------------------------------
modbusId = 9
channel = 3
-- -----------------------------------------------------------------------------------------
if pg7_init == nil then
pg7_init = true
last_time = scl.sysclock()
modbus.close() -- First, close it (just in case it was left open).
modbus.open(
12, -- CAN2GO Modbus ID
"RTU", -- ASCII or RTU
9600, -- BAUD RATE
8, -- Data Bytes
"EVEN", -- Parity mode
1) -- Stop bits
end
this_time = scl.sysclock()
if this_time - last_time >= 300 then -- Only read every 300 seconds! (5 mins)
-- Read Meter (iEM2000T through SmartLink)
result, values = modbus.hr_read( -- read values for current and voltage and store in table
modbusId, -- Slave modbus ID,
14200 + (channel-1)*40, -- Register starting address,
32) -- Holding registers to retrieve
if result == 0 then -- 0 = success
i2 = values[12] * 0x10000 + values[11]
print("Number of Pulse (i2): " .. i2)
i2PulseWeight = values[32]
print("Pulse Weight (i2): " .. i2PulseWeight)
i2Energy = i2 * i2PulseWeight
print("Total cummulated energy: " .. i2Energy .. " kWh ")
scl.nodes["ME"]["AV11_Present_Value"].value = i2Energy
last_time = this_time
end
end
In the following example, we connected our meter to i2 on the channel 3 of our smartlink which has modbus id 9.
Note that the energy value is cumulated so if you want the interval data, you will need to add an extra value to store the previous value and provide the difference at each interval.
Finally if you want to connect to i1, use values 9 and 10 of the table and the pulse weight is at value 31.
Here is the full list of registers if you wanted something else:
As you can see in this example, I'm putting the value of my cumulated energy in AV11 (that you will have to create through the Add Object button again). Doing that will allow you to create a trend to store and display the energy (again, you probably should use the interval value instead).
If you need further information about Smartlink, you can use the great user manual at the following address. Look for the DOCA0004EN.pdf document on the page.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.