Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Prayuktibid

Pages: [1]
1
Technical support / FMD88-10 PLC's MODBUS TCP client malfunctioning
« on: May 10, 2019, 02:44:10 AM »
I have FMD88-10 PLC I wanted to perform Modbus read and write operation form this PLC for monitoring and control purpose. I have one Fronius solar Inverter and one Sinexcel Battery Inverter both are connected with PLC using Modbus TCP protocol. The ladder logic is written in this way that performing read and write operation in a continuous manner with respect time like in a never-ending loop. but PLC can able to perform read and write operation in these two devices one time means at the first time or the first cycle is able to read the value from Modbus register of that device but in next cycles, it was unable to fetch data from those devices.

I didn't find any reason behind this,  why it is behaving like this? I have attached my PLC code with this message. Please help me to find the error and its solutions. Thank You.

2
So you should use a USB-RS485 adapter (e.g. U-485) connected to a PC. Connect the RS485 port of the U-485 to the RS485 bus connecting the FMD PLC and the device. Now run a terminal emulation software that can display binary data and trigger the custom function to send Modbus command from the FMD PLC. You should observe the correct Modbus command packet sent from the PLC to the device.
Okay, I will do it.

I have one question.  Is FMD88-10 PLC able to read/write floating point data from Modbus Registers?

3
In your sample program "Initialization" you run SETBAUD to COMM1 but COMM2 was commented out. That means COMM2 (RS485) port will still be operating at default 38400,8,1,n
Sorry, I just mistakenly commented out COMM2 but I was really trying to communication with MRA4 Relay through COMM2. I know that COMM1 for RS232 and COMM2 for RS485 in my code I have  shown you wrong but actually I was trying to communicate through COMM2. Please don't mind.

But your "MBRTU" function contains READMB2 12,....    which means you are trying to use COMM2  (RS485) to talk to your device.
Yes, absolutely.
I am not sure why there was the line SETSYSTEM 12,1  in your initialization code. Are you trying to use Modbus TCP to talk to a device that is connected to COMM1 of the PLC using Modbus RTU? That is one purpose of SETSYSTEM 12,1, which is to act as a Modbus TCP to Modbus RTU gateway
No, I just want to talk with that device through COMM2(RS485) only. FMD88-10 acts as Modbus Client and MRA4 relay as a slave.

Also was there any data received into DM[4], DM[5].....DM[9]?
No, nothing.

You can remove the FOR NEXT Loop in the Checkstatus1 function because READMB2 function will run to completion and STATUS(2) will immediately indicate whether the communication was successful so there is no need to put a FOR NEXT loop to test for STATUS(2).
Okay, I will do it. From STATUS(2) function I am getting "0" return.

You can remove the checkcom function as it does not serve any purpose and only will slow down the program.
Okay, I just use this function to check if any data received in COMM port, if READMB2 command successfully applied. But both STATUS(2) and INCOMM(2) gives "0" and "-1" returns respectively.

4

You did not specify what was the problem.

I did specified about my problem that is I am not able to read modbus register's value of woodward MRA4 relay by using FMD88-10 plc. I had sent my code for further clarification.


Anyway, as per our previous post if you have some doubt about communicating with a 3rd party Modbus slave, always use a PC based application such as the Modbus Poll software to test your hardware. Once you get a successful communication you would have figured out most of the parameters required for a successful communication, such as the actual binary address, the function and the communication parameters.


I had done a Modbus RTU communication test of this hardware.(Woodward MRA4 relay) on Raspberry Pi before sending you this question and on that test,  I was successfully read Modbus register values from this hardware through Modbus RTU communication. So You could be sure that this hardware is okay.

I was trying to read register values from 20146 and 32500 registers with Modbus function code 4(0x04) and 16 (0x10) respectively but I was failed to read from both register. I am sending my i-trilogi .PC6 file with this reply please check it.

5
Woodward MRA4 relay Modbus Data point

6
Hello,
        I was trying to read Input and holding register's values from Woodward MR4A relay through Modbus RTU communication. This woodward MRA4 relay connected with i-Trilogi FMD88-10 PLC through RS485 port and this MRA4 relay support 8data bits, 1 stop bit, even parity with baud rate 19200. I have used two custom functions to check  'command status" by using STATUS(2) and "incoming massage in comm port" by using INCOMM(ch)  but the STATUS(2) gives '0' return and b]INCOMM(ch)[/b] gives '-1' return.

This is my i-Trilogi code..

[Fast Scan]
Code: [Select]
'SETSYSTEM 1, &HFF
'SETSYSTEM 2, &HFF
SETPROTOCOL 3,1 'set port 3 for fixed ModbusRTU protocol
SETPROTOCOL 2,1 'set port 2 for fixed ModbusRTU protocol
SETBAUD 3, &H44 'set port 3  as 8 data bits, 1 stop bit, even parity, baudrate 19200
SETBAUD 2, &H44 'set port 2  as 8 data bits, 1 stop bit, even parity, baudrate 19200

[Every Scan]

Code: [Select]
SETSYSTEM 6,4 ' set seytem for modbus function code 04
READMB2 12,1,20146,DM[1],2 'read through port 2
call Checkstatus
call checkcom
TIMERPV[T1]=50
CLRIO T1
SETSYSTEM 6,3 ' set system for modbus function code 03
READMB2 12,1,32500,DM[4],6 'read through port 2
call CheckStatus1
call checkcom

custom function [checkstatus] - to check command status
Code: [Select]
FOR I=1 to 1000
A = STATUS(2)
IF A=1 RETURN:
ELSE
SETLCD 1,1,"ReadFailuire"
ENDIF
NEXT

custom function [checkcom] - to check incoming massage in port 2 or 3
Code: [Select]
FOR J=1 to 1000
D = INCOMM(2):
IF D>0 RETURN:
ELSE
SETLCD 3,1,"Nothing receive"
ENDIF
NEXT

7
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: September 12, 2017, 04:05:16 AM »

8
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: September 12, 2017, 03:57:26 AM »
I'm facing a strange problem now. I was trying to follow your method but it is not giving the right response. The FMD88-10 able to write data for sometimes and sometimes it is unable to write data on same modbus single holding register address that is 40492(16-bit). Also This FMD88-10 is behaving equally for register address 40492.


Also try using Modbus function 16 (0x10) to execute the WRITEMODBUS command instead of function 06 in case the device does not support function 06 at this particular address
I have tried on both modbus function code single register write(0x06) and multiple register write(0x16).

I have attached my code and the modus document of cluster controller with this reply please find it.

(the modbus document has attached in next reply.)


9
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: September 04, 2017, 08:54:18 PM »
Did you get a successful connection before you run the WRITEMODBUS command?
 Yes
30001 to 39999  - can only be read using Modbus function 04 and the binary address = Modicon address - 30001
So to read anything in the 30001 to 3999 you use SETSYSTEM 4.4 to change to read the input register, then subtract the given address by 30001
E.g. Version number at address 30001
so  READMODBUS should read from binary address = 30001 - 30001 = 0

I am now able to read data from Input registers.

40001 to 49999 can only be read using Modbus Function 04 and the binary address =( Modicon address - 40001)

So if you want to write to Modicon address 40493 you should be writing to 40493-40001 = 492.

While I am trying this as per my code it gives "writing failure" by checking the STATUS(2) function.

10
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: August 25, 2017, 02:30:56 AM »
Here The TBASIC Code.

11
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: August 25, 2017, 02:29:31 AM »
Thanks for your reply

Is the FMD88-10 the master to read 32-bit data from a slave device?
Yes, FMD88-10 is Master device and I want to read/write data from a cluster Controller(Slave Device).

All Modbus registers are accessed in 16-bit only. To access 32-bit data you normally would need to read two adjacent Modbus registers into two DM16[] and access them as a DM32[] variable.
I have tried in this way before.

The PLC handles number in Big Endian. If the slave (server) arrange the data in Little Endian you will need to use TBASIC to swap the two adjacent DMs so that the are arranged in  Big Endian.
okay, Thank you.

I was trying to read from SMA Cluster Controller's INPUT Register(register number 30005, datatype U32) which contain Serial number of this device but PLC is unable to do that. I have attached my TBASIC code along with SMA cluster controller's Modbus data manager with this reply. please find the attachments and please help me to solve this problem

12
Technical support / How to read 32bit data from Modbus Registers?
« on: August 24, 2017, 09:23:46 PM »
Hello Folks,
I am using Trilogi PLC FDMD88-10 model and I am using it for Industrial purpose. My question is how to read 32 bit data from modbus register also how can I configure my code for Big-endian and Little-endian data fromat while read or write any data in modbus register?

13
Technical support / MODBUS/TCP CONNECTION Problem
« on: August 24, 2017, 04:02:26 AM »
Hello Folks,
 I am using Trilogi PLC FDMD88-10 model and I am using it for Industrial purpose. I was trying to Connect with a Cluster Controller(MODBUR RTU and MODBUS TCP both are supported)  to Read Modbus Registers value from it through MODBUS/TCP.  I could not connect with CLUSTER CONTROLLER. I have given proper IP address of Cluster Controller, Proper Input Register address also I have checked the Connection Status from INPUT$() function it also returns nothing. I don't understand what is my fault. I have uploaded my PLC code my humble request is please check the code and help me to solve my problem.

14
Technical support / Re:How to protect my PLC code from others?
« on: June 23, 2017, 09:07:33 PM »
Thank you very much for your Kind Information.

15
Technical support / How to protect my PLC code from others?
« on: June 22, 2017, 09:20:19 PM »
Hello folks,
I am using Trilogi PLC FDMD88-10 model and I am using it for Industrial purpose. So I  would like to know how can I secure my code for confidential purpose such that no one can copy, view my code. what are the procedure to authenticate my Code?
Please suggest me. Thank you.

Pages: [1]