Author Topic: Excellink  (Read 13356 times)

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Excellink
« on: December 23, 2010, 10:21:44 AM »
Hi. Currently have a MD888 loaded with a blank program, attached with a EXP4040. When I try to use ExcelLink to read input[2], the excel is hanging on me when I activate Input 32 on the EXP. I think it has something to do with the long integer of Excel? Any idea how to solve it?


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Excellink
« Reply #1 on: December 24, 2010, 09:00:31 PM »
Just tested with ExcelLink reading an INPUT[1] and went through input #17 to #32. No problem detected.

This action was added to the demo ExcelLink s1-LocalHost Demo and reading from INPUT[1] every second. The data was written correctly to the Excel cell starting from 0 to 256 (for input #17 to #24) and then from 512 to -32768 when input #25 to #32 are turned ON one at a time.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Excellink
« Reply #2 on: December 24, 2010, 11:38:16 PM »
hi. Merry xmas to u. The -32768 is the problem i'm having. i'm using dec2bin function in Excel to convert it into binary in order to know which input is on. With this figure, the excel is having problem converting.

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Excellink
« Reply #3 on: December 26, 2010, 11:18:00 PM »
Since all integers in TBASIC are signed integers, when the highest bit is ON it is considered negative number and therefore -32768 is correct.

This is not a PLC or ExcelLink problem. You have to write an Excel macro to check if the number become negative, then adds 10000H (or 65536 decimal) to it so that it become unsigned number.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Excellink
« Reply #4 on: February 16, 2011, 08:41:10 AM »
Hi. If Excel Link is running every 0.5s and MD888 is using readmodbus to communicate with other slave PLC, will the execution time of the whole program be slowed down?

How do one estimate the execution time of the whole program? One step takes approximate 12 micro second but what about custom functions?


support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Excellink
« Reply #5 on: February 17, 2011, 07:23:22 AM »
When the PLC has to handle communication exchange with other devices it certainly will have some impact on the program scan time. If the PLC has to send MODBUS command and wait for the other device to respond, then the serial transmit time and receive time as well as the latency that the device takes to respond all adds up to the delay.

When ExcelLink is retrieving data from the PLC via host link commands the CPU will have to spend time buffering the incoming command (via serial interrupts) and once a complete string is received it will then process the command and send the response. So again there will be some impact on the program scan time.

There is no easy method to compute the execution time of each TBASIC command since it varies depend on how complex a task the CPU need to do.

You can connect an Normally-closed output contact to drive the output coil itself and use an oscilloscope to measure the period of the resulting pulse trains. This gives you an idea of how much time the program execute. However, since not all custom function are run at every scan of the ladder program what you measures is only a rough estimate. If you change the custom function of concern to non-differentiated then you can truely measure its scan time.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Excellink
« Reply #6 on: February 17, 2011, 08:21:44 AM »
Hi. So will it helps if I use a browser to get data from FMD88 instead of using Excel Link? Excel Link will have some delay while browser will be like online monitoring?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Excellink
« Reply #7 on: February 17, 2011, 08:32:50 AM »
ExcelLink connects to the PLC using socket connection, just like online monitoring. ExcelLink can also connect to the built-in Ethernet Fserver on the FMD88-10 PLC and it is faster and less overhead on the CPU.

If you use browser then it connects using http protocol, which is much slower than direct socket connection, but the overhead on the PLC is less since communication doesn't occur as frequently as direct connection.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

can

  • Full Member
  • Posts: 160
  • I'm a llama!
    • View Profile
Re:Excellink
« Reply #8 on: February 17, 2011, 06:39:48 PM »
Hi. So I can use a FMD88 to communicate with other plc using RS485, get temperature readings from I7018 using comm port 1 and auto485, and excellink and programming using Ethernet cable? Will the response be slow? Will be connecting push button to it also. Can the pushed buttons be detected without delay?

« Last Edit: February 17, 2011, 06:43:08 PM by can »

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:Excellink
« Reply #9 on: February 20, 2011, 02:32:58 PM »
The scan time will be determined by the longest communication overhead between the devices (PLC to I-7018, PLC to another PLC) and if there is communication failure then the delay can be as much as 150ms which is what the PLC typically waits for a response from slave.

If you need to capture fast occurring input, then select an input that can be defined as interrupt and use the INTRDEF to config an interrupt service routine (ISR) to process the input. If an output is to be updated in the ISR then use REFRESH command to update the output at the end of the ISR.

Email: support@triplc.com
Tel: 1-877-TRI-PLCS