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 - taufiqsunar

Pages: [1]
1
Technical support / Re:Tech Tip & Sample Codes
« on: April 16, 2012, 08:51:39 PM »
I have been able to send the command using FOR ... NEXT loop. But the response message is too long to store it in a DM variable.

Im using DM[111] = INCOMM(3)

and in DM[111]  there is -1 in decimal or FFFF in hexadecimal, that indicating if it is overflow.

Can I parsing it in several DM? If it is possible, how to do it?

This is the response format...

2
Technical support / Re:Tech Tip & Sample Codes
« on: April 04, 2012, 03:16:04 AM »
I have Modbus ASCII RS485 slave device with request packet format as picture below.

I have been trying with

Code: [Select]
DM[101] = READMODBUS(3, 6, &H5030)
but it is error on compiling.

Im also trying

Code: [Select]
DM[101] = READMODBUS(3, 6, 20528)
there is no response on DM[101].

Im even trying

Code: [Select]
PRINT #3 "STX06RXP0ETXCRC"
A$ = INPUT$(3)

and still no response.


Previously, I have checked the setting in my slave device and it seem there is nothing strange.

3
Technical support / Re:Tech Tip & Sample Codes
« on: April 03, 2012, 02:33:31 AM »
I am sorry, maybe it is basic and fundamental, but because I am a newbie to this protocol, I want to ask a question.

Whether in the Modbus ASCII there are also functions like function 3,4,6,16, etc?

4
Technical support / Upload Feature on Internet Trilogi Software
« on: March 22, 2012, 05:03:11 AM »
Im sorry, I have another question.

Are there any upload feature on Internet Trilogi Software to backup the program from PLC to PC?

Currently Im using FMD1616-10 and Internet Trilogi 6.1

Thank you very much and regards!

5
Technical support / Re:RS485 Modbus RTU Communicating with Autonics
« on: March 21, 2012, 03:32:13 AM »
its turn out that the problem is on my device. there is a setting that set the communication time between the device and master.

thank you for your attention!

regards,

6
Technical support / Re:RS485 Modbus RTU Communicating with Autonics
« on: March 15, 2012, 02:13:20 AM »
I feel sory, but I dont have RS485 to USB converter here. Neither RS485 to RS232.

So the only way that I have is just connecting my slave device with PLC.

I have been trying to use address &H03E7 and &H03E9, but it doesnt work.

I just sent you the user manual for my slave device if you willing to read it.

Many thanks,

7
Technical support / Re:RS485 Modbus RTU Communicating with Autonics
« on: March 14, 2012, 11:33:33 AM »
the baudrate of my slave device is just same as of the FMD1616-10, its 38400bps.

ok, so its my new code

Code: [Select]
SETPROTOCOL 3,1
SETSYSTEM 6,4

Code: [Select]
DM[111] = READMODBUS (3, 1, &H03E8)

but still there is no answer

or may I send you the manual by email?

8
Technical support / RS485 Modbus RTU Communicating with Autonics
« on: March 13, 2012, 12:52:42 AM »
Im a new user on Super PLC. Currently Im using FMD1616-10  to controlling slave device Autonics Temperature Controller TK4M with RS485.

The slave device can communicating with Modbus RTU Protocol.

The slave device ID is 1.

Im trying to access temperature value in that device. The address of present value is 03E8H, with function 04.

Im using the hard code from an example in this forum.

this is my code

Function first_set

Code: [Select]
SETPROTOCOL 3,1

Function read_autonics

Code: [Select]
A = &H03
B = &HE8
N = &H0A

FOR I = 0 TO 1
Z = INCOMM(3)
NEXT

call read_modbus

Function read_modbus

Code: [Select]
'  This function implements MODBUS RTU function 04 using the INCOMM and
'  OUTCOMM commands.
'  The address to be read is in A
'  The number of channel to be read is in N
'  The data are returned in DM[201] to DM[201+N]
'  DM[101] to DM[200] are used by this function

DM[101] = &H01     ' node address of slave
DM[102] = &H04     ' function 04
DM[103] = A    ' upper 8 bit of address
DM[104] = B ' lower 8 bit of address
DM[105] = &H00        ' upper 8 bit of count
DM[106] = N        ' lower 8 bit of count
X = CRC16 (DM[101],6) & &HFFFF  ' compute the CRC16 of DM[101] to DM[106]
DM[107] = X / 256    ' upper 8 bit of CRC16
DM[108] = X & &HFF ' lower 8 bit of CRC16

FOR I = 1 to 8          ' send out the MODBUS RTU command in binary
  OUTCOMM 3, DM[100+I]
NEXT
delay (10)  ' delay for a while to wait for response
DM[111] = 0
TIMERPV[1] = 10         ' if the timer counts down, the loop is exited
WHILE DM[111] <> &H01   ' wait for response and store first byte
 DM[111] = INCOMM (3)
 IF TIMERPV[1] = 0
  SETLCD 4,1, "NO RESPONSE         "
  RETURN
 ENDIF
ENDWHILE

FOR I = 1 to N          ' assuming small number of read data
  DM[111+I] = INCOMM (3)
  IF DM[111+I] < 0 GOTO @5: ENDIF
NEXT

@5 FOR I = 1 to N          ' convert two bytes into one 16-bit word.
  DM[200+I] = DM[112+I*2]*256+DM[113+I*2]
NEXT


in ladder diagram, on first row, there is a normally open button that can be executed once on starting the system, that activating function first_set

on second row, there is clock that triggering read_autonics every 1 second.

but that doesnt work at all. i checked the system with on-line monitoring and DM[111] just contain -1 in decimal and FFFFFFFF in hex.

any suggestion would be accepted! many thanks and regards

Taufiq Sunar
 ???

Pages: [1]