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

Pages: 1 ... 8 9 [10] 11 12 ... 212
136
You did not specify what was the problem.

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.

For RTU another way to troubleshoot the communication problem is to use a PC to monitor the communication packet exchange between the PLC and the Modbus RTU slave. What you need is a USB to RS485 adapter (e.g. the U-485) and connect to the RS485 bus between the two devices, then download and run a terminal emulation software to monitor the comm. One good and free software is the RealTerm software that can display binary data exchange.

137
Technical support / Re:TIMER Contact Behavior
« on: September 19, 2017, 02:47:31 AM »
Thanks for helping to document the timer behavior. You are mostly right simply based on your observation! The followings describe exactly what happens during the timer updates:

1. Following reset, the input state for all TIMERs is set to zero to indicate that the TIMERs are inactive.
   The contact associated with each TIMER is set to 0 to indicate that the TIMER has not timed out.
   The timer present value are all set to -1, indicating that the timer is inactive.

2. On the each scan of the ladder logic the evaluates the control input state for each structure during the
   ladder logic scan.  This state is maintained in the data structure associated with the TIMER.

3. If the ladder logic scan determines that the TIMER control input is 0 or false, the contact associated with the
   TIMER is set to 0 or de-asserted and the timer PV is set to -1.

4. If the ladder logic scan detects that the TIMER control input has transitioned to l, then the TIMER is active.
   The TIMER PV is reloaded from SV and the TIMER's contact is set to 0 or FALSE. These changes happen when the
   rung of ladder logic that controls the TIMER is executed.  These changes are visible to all other rungs of ladder
   logic that follows the rung that controls the TIMER.

5. Every 0.01s the timer countdown task is run. If a timer's PV is >= 0 it will be processed either every time the
   timer countdown task is run (for high speed timers with 0.01s time-base) or every 10th time the timer countdown
   task is run (for regular timers with 0.1s time-base). Timer countdown task runs on interrupt and
   is independent of the PLC program scan time so that the timer can count down accurately even if the program
   scan time is > 0.01s.

   At the start of each ladder logic scan, each TIMER that is active at the end of the previous scan may have its PV
   decremented based on either a 0.1 second or 0.01 clock.
, the I/O scan cycle check and if the TIMER's PV is now 0,
   then the contact associated with this TIMER will be set asserted (set TRUE).  Please note that contact
   transitions for 0..1 at the start of the ladder logic scan and NOT at the rung of code that controls the TIMER. THAT"S RIGHT!!

The most important points to take away from this long winded guess on TIMER behavior is that a TIMER's contact is set TRUE (1) at the beginning of the scan and the contact is set FALSE (0) at the ladder logic rung that controls the TIMER is evaluated.   THAT's RIGHT!!


138
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: September 18, 2017, 10:29:05 PM »
It is unlikely to be a problem with the PLC as the FMD88-10 has no problem working with many third party Modbus RTU slave and Modbus TCP server. You may want to test the communication between the PC (using the Modbus Poll software that was mentioned in this earlier thread) and communicate your Modbus slave controller to observe if there is any particular issues.

Since you are using Modbus TCP your program also must check if the network connection is still valid before executing the WRITEMODBUS command and READMODBUS command. If the connection is lost then the WRITEMODBUS command will fail to run.

Note that the Modbus client has a time out so if the connection is left idle for longer than the time-out settings (see Ethernet & ADC settings in i-TRiLOGI) the connection will close automatically. If the WRITEMODBUS command is executed infrequently then try to increase the time-out so to maintain the connection. Alternatively close the connection when not in use and re-connect only when you need to execute the MODBUS command.

139
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: September 05, 2017, 04:07:54 AM »
Try using a PC based Modbus software to test the communication with your device and see if the address and data wrtten is acceptable. That gives you better visibility of what's going on between the Modbus client and the Modbus server. Once you can confirm that the address or data is valid you can then use the same function, address and data to send from the PLC to the device.

One such tool is the Modbus Poll software that you can download from:

http://www.modbustools.com/

They have a free evaluation version that will run for a few minutes and then stop. You can restart it again.

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.

140
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: September 04, 2017, 12:06:42 PM »
Did you get a successful connection before you run the WRITEMODBUS command?

Also I think the device is using the Modicon convention to represent the Modbus registers.

Modicon Convention is as follow:

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

Similarly,

40001 to 49999 can only be read using Modbus Function 03 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.

Give that a try and see if it works for you.

[Edit] - For 40001 to 49999 can only be read using Modbus Function 03 (it was wrongly written as 04 initially).

141
Technical support / Re:How to read 32bit data from Modbus Registers?
« on: August 24, 2017, 11:44:36 PM »
Is the FMD88-10 the master to read 32-bit data from a 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.

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.


142
Technical support / Re:MODBUS/TCP CONNECTION Problem
« on: August 24, 2017, 11:39:43 PM »
You code did not wait for the MBTCPCONNECT to complete the connection before you run the READMODBUS command. The program execute much faster than the time it takes to make connection and that's why the READMODBUS command will not be able to obtain the data.

Please follow the example in your TRiLOGI\TL6\usr\samples\Ethernet\ModbusTCPTest.PC6 or download from the following link:

http://www.triplc.com/yabbse/attachments/ModbusTCPTest.PC6

143
Are there any other interrupt intensive activities going on at the same time. E.g. High speed counter or pulse measurement?

What is your PLC firmware version? If it is >= r83 you could try upgrade the firmware to the latest where interrupt service routine has been improved to avoid overrun of the interrupt service queue where there are lots of interrupt happening at high speed, as reported by Gary. The improved interrupt service has worked well for Gary and eliminated the issue he mentioned, although his issue is quite different from your report.

144
We are not aware of any issue with the relay not being set after a STEPMOVE or STEPMOVEABS command.

Does the PLC program use the completion relay to trigger another motion immediately? If so, then the completed flag relay that was set in the previous motion will be cleared once a new motion starts. If the PC software did not read the completion relay quickly enough it may just miss the change of state.

Also in your PC program do you use the WR command to write to a relay bank that also includes the completion flag?  What was the command that your PC send to the PLC to trigger the motion?

145
Technical support / Re:relay not latch Random
« on: July 27, 2017, 09:44:36 PM »
Are you using the touch screen to trigger an input?

Note that the PLC physical input is refreshed every end of the ladder logic scan. That means that if the HMI triggers a physical input when the ladder logic program has already passed the rung that uses the input (to latch a relay or count down a timer), the input bits will be refreshed at the end of the ladder logic scan and the changes from the HMI is lost. This can cause the input trigger from the HMI to be unseen by the ladder program.

The correct way is always for the HMI to turn on an internal relay bit and the internal relay bit is then used by the ladder logic program for decision making. The program can then clear the internal relay bit after the command has be executed. This ensure that the input will not be cleared by the I/O refresh cycle.

146
Technical support / Re:Google home hmi development
« on: July 20, 2017, 10:48:34 PM »
Thanks for the suggestion.

In our office we have a test setup with Amazon Echo and our engineer wrote a script on AWS. The voice instructions received by Echo is uploaded to the AWS. The script on the AWS transmits a command to a SmartTILE-based PLC (which acts as a TCP-to-RS485 gateway) using the web services command HTTP GET  /HOSTLINK/[actual hostlink command].

The gateway is connected to a network of specialty lighting control PLC called ALEC (see http://ALEC.TRIPLC.COM). These ALEC are connected to the gateway via isolated RS485.  The hostlink commands received by the gateway is then dispatched to each individual ALEC.

With this setup we only need to port forward to a single gateway from the public internet. Yet, we now can  turn ON/OFF and set the brightness of the lights in any lighting zone using voice command.

Of course if the Google Home can support Modbus/TCP command it would be even more efficient as HTTP protocols involved quite a lot of overhead just to transmit a small amount of data. But it is still possible to achieve the goal using only what our PLCs currently have, and we have demonstrated how it can be done.




148
Technical support / Re:NANO-10
« on: June 27, 2017, 12:16:56 PM »
For Nano-10 you can only recover the IP address using the TLServer and U-485 adapter connected to the PLC via the RS485 port.

You need to run TLServer and test the RS485 communication with the PLC first. If for some reason your PLC has changed the serial port settings you may encounter some difficulties connecting to it. If so, then put the jumper on J4 to pause the PLC, then power cycle it so that it starts up in default 38400,8,1,n. You can test the communication with the PLC via the "Setup Serial Port" screen. Please refer to the manual for details.

Your i-TRiLOGI software will connect to the local host (IP address 127.0.0.1:9080) and then you will be able to retrieve the IP address, subnet mask, Internet gateway etc to allow you to connect to the PLC via its IP address.

For Fx PLCs, as well as FMD PLCs with newer firmwares you can put the PLC into a default IP address of 192.168.1.15  (note that it is ".15", not ".5" when you power on the PLC with DIP switch #3 set to ON. That allows you to retrieve PLC's settings via Ethernet port using the known IP address. Do remember to turn OFF DIP switch #3 and power-cycle the PLC after you have made changes and want to connect to the IP address defined in the PLC.

149
Technical support / Re:How to protect my PLC code from others?
« on: June 23, 2017, 09:01:41 PM »
Your code is automatically protected from downloading by any user once it is transferred to the PLC. There is no backdoor means to recover the program from the PLC. That is the feature of these OEM PLCs. However you do need to backup your program properly because if you lose the source program we will not be able to help you recover the program.

Given the low cost of SD card, some OEM would put a copy of the actual program inside a password-protected ZIP file and attach the SD card to the control panel. Only the OEM knows the password to unzip the program. That ensure that a secure copy of the source code follows the machine but only the OEM can access the program.


150
Technical support / Re:Inconsistent parsing of ":" as delimiter 7.12
« on: June 16, 2017, 10:34:47 AM »
Thank you for your report. The problem occurred because ':' was also used as an acceptable  character for names due to the clock pulses using it as part of the name (e.g. "Clk:.01s", "Clk:1.0s" etc).  Hence the compiler treated it as part of the string that form the name. By introducing a space the ambiguity was resolved and allows the program to be compiled.

We have fixed this bug and this will be included in the next release of the i-TRiLOGI software.

Thank you.

Pages: 1 ... 8 9 [10] 11 12 ... 212