Support Forums
DT85G como esclavo MOBDUS RS485

Buenas noches, tengo dificultades para configurar por linea de comando el datalogger DT85G como MODBUS ESCLAVO por RS485.
He creado el siguiente programa que lee temperatura

BEGIN"DT85GGGG"

RS1S
RA"Programa_1"("b:",ALARMS:OV:100KB:W60,DATA:OV:1MB)5S
LOGONA

2*YS05("termi_2~degC",=1002CV)

4*YS05("termi_4~degC",=1004CV)

END

Ahora, como hago por linea de comando para configurar el DT85G como esclabo modbus rs485 y poder leer los CV desde un maestro modbus

Buenas noches, tengo dificultades para configurar por linea de comando el datalogger DT85G como MODBUS ESCLAVO por RS485. He creado el siguiente programa que lee temperatura BEGIN"DT85GGGG" RS1S RA"Programa_1"("b:",ALARMS:OV:100KB:W60,DATA:OV:1MB)5S LOGONA 2*YS05("termi_2~degC",=1002CV) 4*YS05("termi_4~degC",=1004CV) END Ahora, como hago por linea de comando para configurar el DT85G como esclabo modbus rs485 y poder leer los CV desde un maestro modbus
edited Feb 18 '24 at 5:34 am

Hi DefLeppard,

First thing, you need to set the logger as a MODBUS slave and give a slave address.

PROFILE SERSEN_PORT FUNCTION=MODBUS
PROFILE MODBUS_SERVER SERSEN_ADDRESS=1

Please ensure the other port settings are the same as the SCADA/ MODBUS Master (BPS, data bit, parity, stop bit, etc.) and use the correct setting (RS232, RS485, or RS422).

PROFILE SERSEN_PORT MODE=RS485

You must define the value type you want to pass to MODBUS Master as a 16-bit integer or a 32-bit floating point. Please use SETMODBUS for this purpose.

Because you set the CV by skipping, we believe you want to pass the value as a 32-bit floating point.

BEGIN"DT85GGGG"

SETMODBUS 1002..1004CV MBFS

RS1S

RA"Programa_1"("b:",ALARMS:OV:100KB:W60,DATA:OV:1MB)5S
LOGONA

2*YS05("termi_2~degC",=1002CV)

4*YS05("termi_4~degC",=1004CV)

END

In your PLC, you can inquire about MODBUS function 4 and register the address 1001 + 1002 for termi_2 and 1003 + 1004 for termi_4. Please remember, if you wish to add more channels and pass it as a floating point, skip the number of CVs in every channel.

Best regards,
dataTaker Expert

Hi DefLeppard, First thing, you need to set the logger as a MODBUS slave and give a slave address. PROFILE SERSEN_PORT FUNCTION=MODBUS PROFILE MODBUS_SERVER SERSEN_ADDRESS=1 Please ensure the other port settings are the same as the SCADA/ MODBUS Master (BPS, data bit, parity, stop bit, etc.) and use the correct setting (RS232, RS485, or RS422). PROFILE SERSEN_PORT MODE=RS485 You must define the value type you want to pass to MODBUS Master as a 16-bit integer or a 32-bit floating point. Please use SETMODBUS for this purpose. Because you set the CV by skipping, we believe you want to pass the value as a 32-bit floating point. ```` BEGIN"DT85GGGG" SETMODBUS 1002..1004CV MBFS RS1S RA"Programa_1"("b:",ALARMS:OV:100KB:W60,DATA:OV:1MB)5S LOGONA 2*YS05("termi_2~degC",=1002CV) 4*YS05("termi_4~degC",=1004CV) END ```` In your PLC, you can inquire about MODBUS function 4 and register the address 1001 + 1002 for termi_2 and 1003 + 1004 for termi_4. Please remember, if you wish to add more channels and pass it as a floating point, skip the number of CVs in every channel. Best regards, dataTaker Expert

I am very grateful. Thanks for the support.

I would like you to help me, declare constants using CV, and then use them in a formula. I did it in the following way, but apparently, I have errors.

BEGIN"DT85_X"

‘================================================
PROFILE SERSEN_PORT FUNCTION=MODBUS
PROFILE SERSEN_PORT MODE=RS485
PROFILE MODBUS_SERVER SERSEN_ADDRESS=7
PROFILE SERSEN_PORT BPS=19200
PROFILE SERSEN_PORT DATA_BITS=8
PROFILE SERSEN_PORT STOP_BITS=1
PROFILE SERSEN_PORT PARITY=NONE
PROFILE SERSEN_PORT FLOW=NONE

‘========CONSTANTS DECLARATION ==========================
99CV = 12.8 ‘ ue / °C
100CV = 0.9823 ‘ CORRECTION FACTOR CALIBRATION

107CV =2700 ‘channel 2 – Hz 0
108CV=27.1 ‘channel 2 – Temp 0
109CV =2700 ‘channel 4 – Hz 0
110CV=27.1 ‘channel 4 – Temp 0
111CV =2700 ‘channel 6 – Hz 0
112CV=27.1 ‘channel 6 – Temp 0

‘========VW AND TEMPERTURE CONVERT MBU TO MBFS ==========================

SETMODBUS 13CV MBFS ‘channel 2- VW (Hz)
SETMODBUS 15CV MBFS ‘channel 2- Temp (°C)
SETMODBUS 17CV MBFS ‘channel 4- VW (Hz)
SETMODBUS 19CV MBFS ‘channel 4- Temp (°C)
SETMODBUS 21CV MBFS ‘channel 6- VW (Hz)
SETMODBUS 23CV MBFS ‘channel 6- Temp (°C)

‘========MICRODEFORMATION CONVERT MBU TO MBFS ===========

SETMODBUS 43CV MBFS ‘channel 2
SETMODBUS 45CV MBFS ‘channel 4
SETMODBUS 47CV MBFS ‘channel 6

RS1S

RA("b:",ALARMS:OV:100KB:W60,DATA:OV:1MB)5S

LOGONA

2FW("VW2~Hz",=13CV,LM,MD350,200)             ‘Channel 2
2*YS05("Temp2~degC",=15CV)                        ‘Channel 2
4FW("VW4~Hz",=17CV,LM,MD350,200)            ‘ Channel 4
4*YS05("Temp4~degC",=19CV)                       ‘ Channel 4
6FW("VW6~Hz",=21CV,LM,MD350,200)            ‘ Channel 6
6*YS05("Temp6~degC",=23CV)                       ‘ Channel 6

CALC("calculo2~ue",=43CV,LM)= (10^-3*0.39102*100CV*(13CV^2-107CV^2))- (99CV*( 15CV-108CV))   ‘ Channel 2
CALC("calculo3~ue",=45CV,LM)= (10^-3*0.39102*100CV*(17CV^2-109CV^2))- (99CV*( 19CV-110CV))   ‘ Channel 4
CALC("calculo4~ue",=47CV,LM)= (10^-3*0.39102*100CV*(21CV^2-111CV^2))- (99CV*( 23CV-112CV))   ‘ Channel 6

END

I am very grateful. Thanks for the support. I would like you to help me, declare constants using CV, and then use them in a formula. I did it in the following way, but apparently, I have errors. BEGIN"DT85_X" ‘================================================ PROFILE SERSEN_PORT FUNCTION=MODBUS PROFILE SERSEN_PORT MODE=RS485 PROFILE MODBUS_SERVER SERSEN_ADDRESS=7 PROFILE SERSEN_PORT BPS=19200 PROFILE SERSEN_PORT DATA_BITS=8 PROFILE SERSEN_PORT STOP_BITS=1 PROFILE SERSEN_PORT PARITY=NONE PROFILE SERSEN_PORT FLOW=NONE ‘========CONSTANTS DECLARATION ========================== 99CV = 12.8 ‘ ue / °C 100CV = 0.9823 ‘ CORRECTION FACTOR CALIBRATION 107CV =2700 ‘channel 2 – Hz 0 108CV=27.1 ‘channel 2 – Temp 0 109CV =2700 ‘channel 4 – Hz 0 110CV=27.1 ‘channel 4 – Temp 0 111CV =2700 ‘channel 6 – Hz 0 112CV=27.1 ‘channel 6 – Temp 0 ‘========VW AND TEMPERTURE CONVERT MBU TO MBFS ========================== SETMODBUS 13CV MBFS ‘channel 2- VW (Hz) SETMODBUS 15CV MBFS ‘channel 2- Temp (°C) SETMODBUS 17CV MBFS ‘channel 4- VW (Hz) SETMODBUS 19CV MBFS ‘channel 4- Temp (°C) SETMODBUS 21CV MBFS ‘channel 6- VW (Hz) SETMODBUS 23CV MBFS ‘channel 6- Temp (°C) ‘========MICRODEFORMATION CONVERT MBU TO MBFS =========== SETMODBUS 43CV MBFS ‘channel 2 SETMODBUS 45CV MBFS ‘channel 4 SETMODBUS 47CV MBFS ‘channel 6 RS1S RA("b:",ALARMS:OV:100KB:W60,DATA:OV:1MB)5S LOGONA 2FW("VW2~Hz",=13CV,LM,MD350,200) ‘Channel 2 2*YS05("Temp2~degC",=15CV) ‘Channel 2 4FW("VW4~Hz",=17CV,LM,MD350,200) ‘ Channel 4 4*YS05("Temp4~degC",=19CV) ‘ Channel 4 6FW("VW6~Hz",=21CV,LM,MD350,200) ‘ Channel 6 6*YS05("Temp6~degC",=23CV) ‘ Channel 6 CALC("calculo2~ue",=43CV,LM)= (10^-3*0.39102*100CV*(13CV^2-107CV^2))- (99CV*( 15CV-108CV)) ‘ Channel 2 CALC("calculo3~ue",=45CV,LM)= (10^-3*0.39102*100CV*(17CV^2-109CV^2))- (99CV*( 19CV-110CV)) ‘ Channel 4 CALC("calculo4~ue",=47CV,LM)= (10^-3*0.39102*100CV*(21CV^2-111CV^2))- (99CV*( 23CV-112CV)) ‘ Channel 6 END
edited Feb 24 '24 at 12:19 am

Hi DefLeppard,

Did you use dEX 2.0 software to write your program? If you did, some parts need to comply with the dEX 2.0 template.

If not, did you use DeTransfer? Can you tell us the error message?

Best regards,
dataTaker Expert

Hi DefLeppard, Did you use dEX 2.0 software to write your program? If you did, some parts need to comply with the dEX 2.0 template. If not, did you use DeTransfer? Can you tell us the error message? Best regards, dataTaker Expert
146
3
2
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft