Posts: 169
Threads: 58
Joined: Oct 2017
Reputation:
0
Hi all,
Is there anyone who could share a JSON file for LM, allowing to read/write the Modbus registers of a Vigiohm FL12H from Schneider Electric?
Thank you in advance for your help and above all, take care of yourself.
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
Are you sure the name is correct? Google didn't found anything.
------------------------------
Ctrl+F5
Posts: 169
Threads: 58
Joined: Oct 2017
Reputation:
0
Hi Daniel,
it's Vigilohm IFL12H, an insulation fault locator, made by Schneider Electric
Posts: 169
Threads: 58
Joined: Oct 2017
Reputation:
0
Hi Daniel,
I can give to you the IFL12H Modbus registers table if necessary...
Have a good day.
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
We can help you to start but you will have to finish it.
------------------------------
Ctrl+F5
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
Can you get it in English?
------------------------------
Ctrl+F5
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
Can you just try to use RTU read test and read register 100 like this
If this won't work try register 101.
------------------------------
Ctrl+F5
Posts: 169
Threads: 58
Joined: Oct 2017
Reputation:
0
Ok Daniel.
read result is 17032 for adress 100
read result is 32768 for adress 101
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
Ok perfect we need to shift registers by -1
Try starting with this
For bits you have to add each bit as separate line and add bitmask
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
bit 0 =
0x1
bit 1 =
0x2
bit 2 =
0x4
bit 3 =
0x8
bit 4 =
0x10
bit 5 =
0x20
bit 6 =
0x40
bit 7 =
0x80
bit 8 =
0x100
bit 9 =
0x200
bit A =
0x400
bit B =
0x800
bit C =
0x1000
bit D =
0x2000
bit E =
0x4000
bit F =
0x8000
Attached Files
------------------------------
Ctrl+F5
Posts: 8069
Threads: 43
Joined: Jun 2015
Reputation:
470
2. Profile type field should be register instead of inputregister
3. String values are not supported by modbus mapper. It can be read via a script, but do you really need these values?
Posts: 169
Threads: 58
Joined: Oct 2017
Reputation:
0
Hi Daniel,
2. I tried yesterday with both formats: same result.
3. Yes, I need theses values to work with the exact product internal date&time for my process
Have you got an Lua script example for this ?
Thank's in advance.
Posts: 4935
Threads: 28
Joined: Aug 2017
Reputation:
225
Hi
2. Looks OK, I would contact SE and ask them for function they use to read this value.
3. You already have product identification in register 100 only in numeric format. Product identifier 17032 = IFL12H
If you really need script for this then try this.
Code:
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
mbproxy =
require (
'mbproxy' )
mb =
mbproxy.new ()
mb :
setslave (
1 )
function readstring (
mb ,
address ,
length )
local data = {
mb :
readregisters (
address ,
length ) }
local bytes = {}
for _ ,
reg in ipairs (
data )
do
if type (
reg ) ==
'number' then
local b1 =
bit.band (
bit.rshift (
reg ,
8 ),
0xFF )
if b1 >
0 then
bytes [ #
bytes +
1 ] =
b1
end
local b2 =
bit.band (
reg ,
0xFF )
if b2 >
0 then
bytes [ #
bytes +
1 ] =
b2
end
end
end
return string.char (
unpack (
bytes ))
end
result =
readstring (
mb ,
160 ,
9 )
log (
result )
------------------------------
Ctrl+F5
Posts: 169
Threads: 58
Joined: Oct 2017
Reputation:
0
It works very fine ! Thank you very much Daniel.
Best regards from France.