AD Click & Red Lion G306 Not able to write to C bits

Bullzi

Lifetime Supporting Member
Join Date
Jun 2012
Location
Colorado
Posts
1,530
Happy New Year everyone,

I am working on a Prototype project using a AutomationDirect Click Ethernet PLC and a Red Lion G306 HMI. I have the HMI connected to the PLC via Ethernet and have the HMI set up to be the Modbus TCP/IP Master.

The problem I have is that I am not able to write to the PLC Contol (C) bits. I have been able to write to the Float (DF) and even the Output (Y) registers but when I try to set a C bit via the HMI using the 2 Position Switch the switch just moves to the 1 position and then right back. The PLC doesn't even show that the status changed.

If I go into the PLC and force the C bit on the switch will move to the 1 position so I am sure I have the addressing correct. Just to make sure I have tried to use the 2 position switch to write to a Output (Y) and that works just fine. I am also able to write data from the HMI to the Float (DF) Registers perfectly too. So from the Addressing and Communications I am pretty sure that everything is working fine.

I have also used a Modbus driver on my PC and have been able to write to the PLC's C bits with success so it must be something in the HMI. I have tried to reflash the G306 with some older firmware just in case there is a issue with the new firmware. No change.

I have talked to AD support and they couldn't offer any ideas on why this is happening. I will try to talk Red Lion tomorrow and see if they have anything to add.

I am hopping one of you guys have had this issue before and can offer some ideas. I have attached my Red Lion Crimson Program as well as the Click Program.

Thanks for any help you and provide!!
 
I'm probably wrong but I thought Modbus only addressed Inputs ans Outputs as single bits. I thought you could get at bits by addressing them 16 at a time as Holding Registers. But I haven't used Modbus TCP on the Click as a server, only as a client. I don't have a Red Lion so I can't help much.


Edit : I see that they are treated as coils. Which allows individual Read and write via function codes 1 and 5 and multiple writes via function code 15.


I see in your program that you should be able to write effectively to C1 and C3. If you write to C2 or C4 their status will immediately be overwritten by the action of the two rungs.
 
Last edited:
I found the answer to my problems thanks to OKIPC and Red Lion Support. I was using a prefix of 1 to set the C bits when I should have been using a 0. I figured it would be something simple and I as just not seeing the Forest because all the Trees were in the way.
 

Similar Topics

Hi guys, I developed an application on a Red Lion DataStation Plus DSPSX device, which has a small "Virtual HMI" you can access via Web browser...
Replies
3
Views
2,792
Hi everyone, I honestly think this is a stupid question and I am completely missing something simple here, but I am having difficulties trying to...
Replies
3
Views
5,649
What is the simples way to do a double click of a button in a ladder logic. New here and I hope this has not been asked before.
Replies
22
Views
526
I have a program that I am gradually piecing together (my first program). There are 4 cascading timers that turn Y001 and Y001 + Y002 on and off...
Replies
8
Views
534
Complete noob here, using a Click C0-02DD1-D to run a test stand. Requirement is to turn on motor run for X seconds, turn off and dwell for X...
Replies
6
Views
1,067
Back
Top Bottom