User Tools

Site Tools


public:products:cv-100r

ACR-CV - Universal Modbus converter (RS485)

ACR-CV-101L-R-D
ACR-CV-101L-R-D2

  • The universal converter is used for application where you need to send data from Modbus over the LoRa network or NB-IoT
  • We offer battery operated units, as well as external power operated units.
  • Each universal converter has implemented LUA scripts and can be configured via configuration software

Technical parameters

Power supply options
External power supply Battery operated unit
AC power supply D-cell battery
Voltage: 85- 305 VAC Battery type: Lithium 3.6 VDC
Frequency: 47-63 Hz Battery capacity: 17 000 mAh
Maximum power consumption: 4 W Recharchable: No
DC power supply
Voltage: 9 - 36VDC
Modbus Interface
Device type: Master
Communication speed: 1 200 - 115 200 Bd
Maximum connected devices: 128 UL (Unit Loads. 1UL = 1.5 mA)
Supported modbus protocols: Modbus RTU, Modbus ASCII, Profibus DP
Modbus power supply: 12V*
* Modbus power supply comes with “R12” variant.
LPWAN communication
LoRaWAN NB- IoT
LoRaWAN specification: 1.0.1 Bands: B1; B3; B5; B8; B20; B28
Registration method: ABP NB module: SIM 7020E
Class: A Transparent AT commands Yes
Frequency: 868 MHz (ISM) Antenna: External; connected via SMA connector
TX Power: 12,7dBm TX Power: 23dBm
Antenna: External; connected via SMA connector Configuration: Over the cable via GUI
General information
IP coverage: IP65
Dimensions: 145 x 90 x 55 mm
Operational temperature: -30 °C to +60 °C
Weight: 250 g
HS code: 85269200
Ordering code
Code Description
ACR-CV-101N-R-D2 Modbus to NB-IoT converter with 2 x D battery
ACR-CV-101L-R-D2 Modbus to LoRa converter with 2 x D battery
ACR-CV-101N-R-D Modbus to NB-IoT converter with D battery
ACR-CV-101L-R-D Modbus to LoRa converter with D battery
ACR-CV-101L-R-EAC Modbus to LoRa converter with AC external power supply
ACR-CV-101N-R-EAC Modbus to NB-IoT converter with AC external power supply
ACR-CV-101L-R-EDC Modbus to LoRa converter with DC external power supply
ACR-CV-101N-R-EDC Modbus to NB-IoT converter with DC external power supply
ACR-CV-101N-R12-D Modbus to NB-IoT converter with D battery with 12V bus power supply
ACR-CV-101L-R12-D Modbus to LoRa converter with D battery with 12V bus power supply


Content of packaging

1x ACR-CV with battery*
* Only for battery operated units

Accessories

  • ACR-CONFIG - configuration cable necessary to configure the converter.
  • ACR-CONFIG-5KV - optically isolated configuration cable necessary to configure the converter.
  • 2J-2JW031-868-C675 - LoRa antenna 3dBi
  • 2J-2JW1024 - NB-IoT antenna, max gain 4.6dBi

Before installation

1. Loosen the screws and open the lid
2. Connect the cables from Modbus to the terminal board
3. Remove the paper from the battery bay
4. The device initializes, flashes green 3 times
5. Put the lid back in the box and pull it off screws

LED signalization

  • 3x blue- start up
  • 1x short blue - periody wake-up
  • 1x long blue- enter configuration mode after long press of user button

Payload

Default LUA script

-----------------------
--- CONFIGURATION -----
-----------------------
----- NB-IoT ----------
APN = "nb.m2mc"
PLMNID = "23003"
protocol = "UDP"	-- UDP or TCP
ip = "192.168.0.20"
port = 4242
receiveTimeout = 500 -- the maximum execution time in milliseconds
----- Modbus -----------
baudrate = 9600		-- baudrate: up to 921600 baud
parity = 0	        -- communication parity: 0 for none, 1 for odd and 2 for even parity
stopBits = 1		-- number of stop bits: 1 or 2
dataBits = 8		-- number of data bits: 7 or 8
rxTimeout = 500     -- slave device receive timeout in ms
------ Timing ---------
-- device wakeup interval
periodHours = 2
periodMinutes = 30
-----------------------
-----------------------
-- CONFIGURATION END --
-----------------------
 
function onWake ()
 
    -- set link parameters - e.g. 9600 baud, 8N1
    api.rs485Setup(baudrate,parity,stopBits,dataBits)
    api.rs485State(1)
 
    -- EXAMPLE Modbus request:
    -- check our applicaton notes or https://simplymodbus.ca/FC03.htm
    -- req = ""
    --              SLAVE ADDRESS     FUNCTION CODE     MSB REG ADDR      LSB REG ADDR
    -- req = req .. string.char(0) .. string.char(3) .. string.char(0) .. string.char(100)
    --              MSB REG COUNT     LSB REG COUNT
    -- req = req .. string.char(0) .. string.char(1)
    -- crc =  api.modbusCrc(req)
    -- req = req .. crc -- add CRC, request is complete and ready for sending
 
    if req == nil then
        print("Please provide configuration!")
        ans = "NO CONFIGURATION PROVIDED!"
    else
        print("To RS485: ")
        api.dumpArray(req)
        api.rs485Send(req)
        answer,length=api.rs485Receive(rxTimeout) 
        print("From RS485: ")
        api.dumpArray(answer)
        api.rs485State(0)
 
        print("From Modbus Slave device: ")
        api.dumpArray(ans)
    end
 
    if #ans < 1 then
        buf = "NO DATA RECEIVED"
    else
        buf = ans
    end
 
    print("To NBIOT: ")
 
    api.dumpArray(buf)
 
    print("Sending to NB-IoT")
    api.nbSend(ip, port, buf, receiveTimeout, protocol)
 
    print("Done sending")
    print("Sleep now, wake in " .. tostring(periodHours) .. "hrs:" .. tostring(periodMinutes) .. "mins.....")
 
    api.wakeUpIn(0,periodHours,periodMinutes,0)
end
 
function onStartup()
    print("Starting up NB-IoT default Modbus script with APN settings")
 
    result = api.nbAT("AT*MCGDEFCONT=\"IP\",\"" .. APN .."\"", 5000, 1)
    print("APN result: " .. result)
 
    result = api.nbAT("AT+COPS=1,2,\"" .. PLMNID .."\"", 5000, 1)
    print("PLMNID result: " .. result)
 
 
end

Default LUA script answer


Converter configuration

The IoT Converter can be configured via a PC application or remotely via a LoRaWAN or NB-IoT network.
Inside the IoT converter is a button that allows you to wake up the IoT converter immediately (asynchronous to the internal clock).

Connecting to the device's configuration

1. Unscrew the 4 screws holding the lid on the device and remove the lid.
2. Unplug the battery or power adapter.
3. Connect the ACR-CONFIG cable into the PC and also into the converter.
4. Launch configuration GUI.
5. Select the port on which the device is connected (for example COM6).
6. Click on “Connect”.
7. Power on the device - either by plugging in the battery or power adapter.
8. Start configuration.

Connecting to the device's communication display

1. Unscrew the 4 screws holding the lid on the device and remove the lid.
2. Plug in the battery or power adapter.
3. Connect the ACR-CONFIG cable into the PC.
4. Launch configuration GUI.
5. Select the port on which the device is connected (for example COM6).
6. Click on “Connect”.

NOTE: To get out of the device's communication display, push the button within the converter and hold for about 6 seconds, until the device switches to configuration mode.


Configuration SW

2019.12

2020.06

Configuration cable

Optically isolated converter
  • Good for externally power supplied units. It can save you from overvoltaging your PC in case of faulty cable connection.
  • Can be supplied by ACRIOS Systems
  • 3.5mm jack connector

LUA script interface

In addition to configuration via a PC application, a LUA scripting interface is implemented in the IoT converter.
The LUA scripting interface allows you to implement your own logic (data preprocessing, etc.) within the converter.
Payload can be also modified by using LUA script.
Details regarding LUA scripts with examples can be found here: https://wiki.acrios.com/doku.php?id=public:general:lua_api


Modbus LUA scripts

RS485 Send message

api.rs485Send( msg)

This function sends msg to RS485 bus. Turn on RS485 using rs485State first.

Arguments

  • msg (string) - Data to be sent to RS485 bus

Example

api.rs485Send('test') 
--sends 'test' string to RS485

Setup the parameters

api.rs485Setup( baudrate, parity, stopBits, dataBits)

This function changes the configuration of RS485 interface

Arguments

  • baudrate (integer, optional) - Baudrate to use for communication (up to 921600 baud)
  • parity (integer, optional) - Parity, 0 for none, 1 for odd and 2 for even parity
  • stopBits (integer, optional) - Number of stop bits, 1 or 2 allowed
  • dataBits (integer, optional) - Number of data bits, 7 or 8 allowed

Example

--setup RS485 interface to 9600 Baud, 8E1 
api.rs485Setup(9600, 2, 1, 8)

Turn on the RS485 circuit

api.rs485State( state)

This function turns on the RS485 circuitry, must be used before rs485Send or rs485Receive.

Arguments

  • state (integer) - New state of RS485 circuitry: 0 for off, 1 for on (fast power-up)

Example

api.rs485State(0) --turn off RS485

Set up the data reception time-out

answer,len = api.rs485Receive( timeout)

This function waits timeout milliseconds for data reception from RS485 bus. Turn on RS485 using rs485State first.

Arguments

  • timeout (integer) - The maximum time in milliseconds to wait for RS485 device answer

Returns

  • answer (string) - Data received from RS485 bus in given time
  • len (integer) - Number of bytes received

Example

--waits 1s for answer from RS485 bus 
ans,len = api.rs485Receive(1000)

Calculate checksum

crc = api.modbusCrc( msg)

This function calculates Modbus request checksum.

Arguments

  • msg (string) - Modbus request

Returns

  • crc (string) - Modbus crc for request

Example

--calculate checksum for Modbus request 110100010002 
req = pack.pack('<b6', 0x11,0x01,0x00,0x01,0x00,0x02) 
crc = api.modbusCrc(req) --crc = "EE9B"

NVT

msg, answer = api.nvtProcess(buf)

This function processes NVT message and either sets baudrate, datasize, parity or stop size for MBUS or MODBUS.

Arguments

  • buf (string) - Message to be processed

Returns

  • msg (string) - Message without NVT sequence
  • answer (string) - NVT answer

Example

ret,port,buf = api.loraSend(0,1000,data) 
if buf ~= nil then 
	buf, nvtans = api.nvtProcess(buf) 
	api.rs485Send(buf)
end

Encode into NVT format

answer = api.nvtEncode(msg)

This function encodes message to NVT format.

Arguments

  • msg (string) - Message to be encoded to NVT

Returns

  • answer (string) - NVT message

Example

ans,len = api.rs485Receive(50) 
ans = api.nvtEncode(ans) 
api.loraSend(0,1,ans)

Technical drawings

LoRa Modbus converter with external power supply

ACR-CV-101L-R-EAC
ACR-CV-101L-R-EDC


NB-IoT Modbus converter with external power supply

ACR-CV-101N-R-EAC
ACR-CV-101N-R-EDC


LoRa Modbus converter with battery

ACR-CV-101L-R-D
ACR-CV-101L-R-D2
ACR-CV-101L-R12-D
ACR-CV-101L-R12-D2


NB-IoT Modbus converter with battery

ACR-CV-101N-R-D
ACR-CV-101N-R-D2
ACR-CV-101N-R12-D
ACR-CV-101N-R12-D2


public/products/cv-100r.txt · Last modified: 2020/10/29 14:34 by Acrios Admin