Jump to content

Modbus TCP Control Word for FC302


marke

Recommended Posts

The Control Word is set by serial communications from the PLC.

These are the values to insert into the control word to RUN Forward, RUN Reverse, STOP and RESET the drive over the Modbus TCP network.

// Run Forward
If ((RunForwardIn = True) and (RunReverseIn = False)) then ControlWord := 16#047C; End_If;

// Run Reverse
If ((RunForwardIn = False) and (RunReverseIn = True)) Then ControlWord := 16#847C;  End_If;

// STOP
If ((RunForwardIn = FALSE) (*And (RunReverseIn = False)*) And (ResetIn = False)) then ControlWord := 16#043C; End_If;

// RESET
If ((RunForwardIn = FALSE) (*And (RunReverseIn = False)*) And (ResetIn = True)) then ControlWord := 16#04BC; End_If;

 

Sample Horner PLC code in CScape 10 SP1 attached.

 

tcp demo.csp

Link to comment
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
×
×
  • Create New...