logo Welcome, Guest. Please Login or Register.
May 27, 2019, 02:58:52 AM
Home Help Search Login Register
 News: Self-Registration temporarily suspended due to abuse.To Register as a member, please email to webmaster@triplc.com with your email and username.

  Internet PLC Forum
  Technical support
(Moderator: support)
  Host-Link Command - Write Inputs
? previous next ?
Pages: [1] Go Down Reply Notify of replies Send the topic Print
   Author  Topic: Host-Link Command - Write Inputs  (Read 2319 times)

Posts: 3

I love YaBB 1G - SP1!

View Profile
Host-Link Command - Write Inputs
« on: July 23, 2003, 09:01:28 PM »
Reply with quote


I wrote a VB program talking to PLC using Host-Link Command. I wanted to control input#16 and input#17 from the VB GUI. The technical information from the user manual on how to send a Host-Link command to write a input is too brief. So my guessing:
a) Write a logic 1 to input#16:
    "WI0180*" + CR
b) Write a logic 1 to input#17:
    "WI0201*" +CR

But I suspect my guessing is wrong.

Please advice. Thanks!    
Report to moderator   Logged
Global Moderator

Posts: 3089

View Profile WWW E-Mail
Re: Host-Link Command - Write Inputs
« Reply #1 on: July 24, 2003, 10:15:11 AM »
Reply with quote

Input #16 belongs to channel 00. So you should be writing to "WI0080*" to turn ON input 16.  However, note that doing so will also affect input #1 to 15 by turning them OFF momentarily. This may have effect on your ladder logic program.

The correct way of doing it is to first read from channel 00 usign RI00*. Then use the OR mask to set the bit of interest:

     INVAR = INVAR | &H80   ' force bit 15 to ON

Then write it back to the PLC using the

"WI00"+ INVAR (converted to two digit hex)+"*"+CR.

Report to moderator   Logged

Email: support@triplc.com
Tel: 1-877-TRI-PLCS
Pages: [1] Go Up Reply Notify of replies Send the topic Print 
? previous next ?
Jump to: 

Login with username, password and session length

Powered by MySQL Powered by PHP Internet PLC Forum | Powered by YaBB SE
© 2001-2004, YaBB SE Dev Team. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!