Sign in to follow this  
Followers 0
-M!ll-

Omron hostlink command

20 posts in this topic

okay.. i'm a newbie in this filed n i don't know what was in my mind when i accept this project.. can i ask u ppl with far more experience than me about the frame command format n responce format so i can tell what section is the address code n what section is the data code.. since i can't get the answer from the manual (Omron programing manual ) n i want to use this command hostlink along with delphi.. i need to monitor IR address from 10001 to 1007, what would the frame command n respond would look like.. i really appreciate any help.. thx.. ^__^

Share this post


Link to post
Share on other sites
In the downloads Section on the website there is a VB sample program which allows you to talk to the PLC with hostlink commands. Try playing around with it and see if it does what you want. Hostlink Demo Program

Share this post


Link to post
Share on other sites
yes.. i already had the program.. n try it.. but i'm still confused about how the frame command n response works.. like this.. RR00000001 .. i don't know what the 1st 4 zeros mean.. all i know that its the begining word n the last 4 numbers r the number of words.. what exactly r the meaning of those numbers, regarding my question about the address code or the data code.. is the 1st 4 zeros means address 10000, n what the last 4 numbers mean?? ^^ same problems with the frame response.. thx for helping me with this..

Share this post


Link to post
Share on other sites
Take a look in the Download section, under Omron Manuals. The W143-E1-5 manual there will be of great help. Section 4 (I think) breaks down all of the commands and reponse codes, explaining each character . There is also sample computer code for proper communication to the plc. Hope this will help gtsuport

Share this post


Link to post
Share on other sites
Download this manual: W143-E1-05 C Series Hostlink Manual @ MrPLC.com @ - Start of Command 00 - Unit Number of Hostlinlk RR - Header Code for Read I/O Register 0000 - Beginning Register Address 0001 - Amount of Registers to Read 41 - FCS Frame Checksum * - End of Command [CR] - Carriage Return @ - Start of Response 00 - Unit Number of Hostlink RR - Slave Repeats Header Code 00 - Normal Completion Code FFFF - All Bits on in the requested Register 41 - FCS Frame Checksum * - End of Response [CR] - Carriage Return

Share this post


Link to post
Share on other sites
wow.. thx for the help.. i'll study the manual at home.. its almost midnight here.. n the lab is getting cold.. thx guys.. hope i can solve my problems with this.. anyway.. if not to bother.. i hope i can contact u guys is i encounter any problems.. since u guys know so much about PLC n PLC programming..

Share this post


Link to post
Share on other sites
okay.. so basically.. if i want to check all the bits from address 10001 to 10007, i just send the command format @00RR00010007FCS*R n i will receive the respond format.. is that correct???

Share this post


Link to post
Share on other sites
Nope.... You wanted to read from word 100 only... And BTW the response will read the entire word in one command NOT Bit level. Therefore you need to extract the bit status from the word returned. Try @00RR0100000160*CR Where 60 is the FCS and CR is carriage return. The FCS was calculated via an FSC calculator that i uploaded, you can find the link here FCS Calculator

Share this post


Link to post
Share on other sites
owh.. it gets rather confusing to me.. mhmm.. can u explain to me, if i want to access the PLC I/O addresses from 10001 to 10007, n i'm using Delphi 6.0 n serial port plugins, what should i do to get it work? since i want to monitor I/O n sensors from my mini plant.

Share this post


Link to post
Share on other sites
You need to understand Channel versus Bit addressing: Review this and then maybe you will understand that the data returned represents all bits in the register that you requested.

Share this post


Link to post
Share on other sites
instead of getting a clear information.. i'm getting more confuse than i thought.. this could take a while.. thx for the info Jay Anthony

Share this post


Link to post
Share on other sites
Hostlink only works with full channels. You are trying to monitor bits within channel 100. The hostlink commands will allow you to read the value of channel 100 and you will need to extract the bit data. The value will come back as a four digit hexadecimal number XXXX where bits 15 - 12 bits 11 - 08 bits 07 - 04 bits 03 - 00 X X X X if bits 00 - 03 are all on and all other bits are off the value of channel 100 will be 000F if just bit 00 is on the value will be 0001. if bits 03 and 00 are on and all other are off the value will be 0009. For your application you will need to ignore the two leftmost digits, and only work with the two rightmost digits. Hope this helps. gtsuport

Share this post


Link to post
Share on other sites
yeah.. i just notice about that.. i thought it was by address when its in bits.. silly me.. thx for the info.. now i just have to work on the HEX values n i do have to work on the checksum (FCS) values, right??

Share this post


Link to post
Share on other sites
Did you check the source code in this link for FCS? Sysway (Hostlink) Demo Program @ MrPLC.com Public Sub Checksum(cmd$, cksm$)    For X = 1 To Len(cmd$)        cks = cks Xor Asc(Mid$(cmd$, X, 1))    Next X    cksm$ = Hex$(cks)    If Len(cksm$) < 2 Then cksm$ = "0" + cksm$ End Sub

Share this post


Link to post
Share on other sites
yes.. i did.. but i still have to convert most of that program into delphi, so wish me luck.. i want to graduate this october, so i have to work hard for this whole month so i can finished this program. at least, i have to be able to extract the data i want from the PLC, that should do the job, the rest is just to compile it with my graphical HMI that i already have :) n u guys r already very helpful to me as a beginner in this filed.. i respectfully can't thank u guys enough.. ^^keep the info coming guys, okay..

Share this post


Link to post
Share on other sites
hi guys.. i'm back.. okay.. here's the problems i encounter, what command chould i send to the PLC as a respond command to activate the flags transmission TXD48 n de-activate the flags receptions

Share this post


Link to post
Share on other sites
finally... i finished my final project presentation, it was like hell.. but i managed ^^ PLC is sure a new thing in my faculty.. lots of questions regarding PLC than questions about HMI program that I made T___T thx to u guys.. all your inputs help me alot ^___^ best regards -M!ll-

Share this post


Link to post
Share on other sites
Hi, As i am currently invlove in a project which deals with HMI and PLC. Just wanna ask you how do you send info from HMI to PLC and vice-versa. I am new in this field and am currently a student. Pls help me. Thks, Kenny

Share this post


Link to post
Share on other sites
u should read from the 1st post through out the last one... i think u can find the way i manage to send the info from PLC to the HMI program..

Share this post


Link to post
Share on other sites
HMI-PLC what kind of HMI? Host Computer[host PC]/Programmable terminal-touch screen[PT] define Network Type that will be used to... [toolbus sysmac_way controller_link etc] okey beibeh, hostPC_HMI -PLC as my experience: i 'm using RS232 for 1:1 connection, protocol:hostlink command how? as described above: hostPC[using VB,Delphi etc] by any event [click/timer] on an object sending command [@_NodeNumber_HeaderCode_TextparameterCmd_FCS_Terminator] this protocol explained on manual (explained above) vice-versa: using read/write use RS485 for 1:N connection using ControllerLink----protocol:FINS Command manual: w227-xx-x, w309-xx-x PTHMI-PLC just design HMI display using NTST-NT SUpport tool ie. push button have a setting that matched with PLC address so if we push that button, one bit will have '1' more object on PT: string value, standard lamp, string input etc manual: v034-xx-x i hope this will make you confused -sorry :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0