Sign in to follow this  
Followers 0
angeraer

Hostlink via terminal

6 posts in this topic

Hello, I'm trying to figure out how hostlink works from previous posts in the forum. Till now I've been able to do some simple tests with my OMRON C200H, connected via a serial cable (9600, 7, Even, 2) to my Windows computer : ex: test the PLC : Command : @00TS123443* Response is the same as the command, so this is ok : @00TS123443* Read 3 words from DM100 Command : @00RD0100000354* Response : @00RD009876000080005E* meaning DM100=9876, DM101=0000, DM102=8000 Write value '1234' in DM101 Commands : 1. Put PC into MONITOR : @00SC0252* 2. Write '1234' into DM101 : @00WD0101123457* 3. Put PC into RUN : @00SC0352* 4. Read one word from DM101 : @00RD0101000157*, this gives @00RD00123452*. Now my question : I would like to read/write the input and output status for example for output bit 110.00 on an OD215 module. Is this possible? I've been looking at the I/O READ/REGISTER commands, but don't understand what they would do? I could always copy the status in the PLC program to some memory area and read/write over there if this isn't possible. Why : I would like to connect an Arduino (with Ethernet module) and Serial module to my PLC. On the Arduino I would like to write a web interface that lets me see the I/O status of my PLC and eventually turn my lights on/off with this web interface. Thanks, a lot! Andy.

Share this post


Link to post
Share on other sites
Use the QQMR command to register specific I/O Bits to read: Then use the QQIR command to read the values of the same registered I/O bits:

Share this post


Link to post
Share on other sites
To individually turn on a I/O bit use KS command: To individually turn off a I/O bit use KR command: To cancel all force set/force reset a I/O bit use KC command:

Share this post


Link to post
Share on other sites
Some other readers will tell you about using the RR and RW commands and then through programming, test the on/off status for each bit, but I am not sure enough of your programming skills. Try the above methods first.

Share this post


Link to post
Share on other sites
Thanks for the info you gave me. I tried it and it works : Register the bit I would like to read (110.00) : Command : @00QQMRCIO 0110003A* Response : @00QQMR005F* (Returns OK) Read the status : Command : @00QQIR5B* Response : @00QQIR0016A* (Returns OK + 1 = ON) Afterwards I tried to change the bit status via the Forced Set command : Command : @00SC0252* (Put PLC in monitor mode) Response : @00SC0050* Command : @00KSCIO 0110003D* (Set the bit 110.00) Response : @00KS0058* Command : @00KRCIO 0110003C* (Reset the bit 110.00) Thanks a lot! Andy

Share this post


Link to post
Share on other sites
By sniffing the serial data being sent by CX Programmer, I noticed an undocumented command : @00MB.... example : @00MB1A03003C* @00MB160400004C* @00MB0D07000001008035* Anybody who has any info on this command? Regards, Andy.

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