Author Topic: National instruments Lookout V6  (Read 13106 times)

mort

  • Newbie
  • Posts: 3
  • I'm a llama!
    • View Profile
National instruments Lookout V6
« on: October 26, 2006, 05:40:22 AM »
I?m attempting to get communication from the M series PLC to lookout V6 via com port 1. I?m using this code WRITEMODBUS 1, 1, 1000, 1234
The response I get back from lookout is ?communication garbled from modbus secondary? Response to short.
Can you help? Any sample code will help.    

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:National instruments Lookout V6
« Reply #1 on: October 26, 2006, 08:45:11 AM »
Lookout is the MODBUS master, so the M-series PLC is the slave. You should not use any of the READMODBUS, WRITEMODBUS, READMB2 or WRITEMB2 command since this will make the PLC the master and therefore conflict with the Lookout role.

As a modbus slave you don't have to do anything other than ensuring that Lookout and the PLC both talk on the same communcation baud rate and settings (default on the PLC is 38,400,8,n,1). The PLC automatically recognizes the modbus protocol and respond accordingly and even if the PLC has a blank program this still work.

If the serial port is to be a dedicated modbus port, you may consider executing the SETPROTOCOL command to fix it as a modbus only port. This can reduce CPU overhead in determining the correct protocol and can reduce errors too.
« Last Edit: October 26, 2006, 08:46:35 AM by support »
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mort

  • Newbie
  • Posts: 3
  • I'm a llama!
    • View Profile
Re:National instruments Lookout V6
« Reply #2 on: October 26, 2006, 10:27:39 AM »
Thanks for the response.
If  I understand you correctly all I need to do is send date out at a specific modbus address i.e   40001. Is that correct ?
Would you have an example that I could try?

support

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3174
    • View Profile
    • Internet Programmable PLCs
Re:National instruments Lookout V6
« Reply #3 on: October 26, 2006, 01:24:47 PM »
Do you mean DATE (as in the real time clock DATE[1], DATE[2] or DATE[3]) or "DATA"?

For lookout to read the input ports (16 inputs at a time), Lookout need only to read from modbus holding register 40001, which maps to PLC's variable INPUT[1] and this represents all 16 input BITS from #1 to #16. The PLC doesn't need to "send" anything out to to 40001. In fact, as I said in earlier post, the PLC can have  blank program and lookout will still be able to read the on/off status of the inputs #1 to #16.

But if  you want the Lookout to check the dates in the PLC, then the PLC program need to copy the content of DATE[1] to DM[3] to Data memory areas, and these values become accessible by Lookout by examining the modbus holding registers 41001 to 45000.
Email: support@triplc.com
Tel: 1-877-TRI-PLCS

mort

  • Newbie
  • Posts: 3
  • I'm a llama!
    • View Profile
Re:National instruments Lookout V6
« Reply #4 on: October 27, 2006, 04:31:59 AM »
Thanks so much for your help. Now I understand.  It works fine now