curtharrington1 Posted March 25 Report Share Posted March 25 I am controlling a VFD via modbus where there is a forward bit and a reverse bit in a command word. I need to implement logic to set/reset the bits based on the direction the VFD needs to move and I want this logic to be wrapped up in a single user defined function block using an enum as the input to protect against invalid arguments being passed. I'm not sure if there is a way to do this but I've tried using the clunky LIST feature which did not work. I know some of the UniLogic supplied blocks do this. Does anyone have any thoughts on how to do this? Link to comment Share on other sites More sharing options...
Saragani Posted March 26 Report Share Posted March 26 Currently, you have no way of defining an enum, or defining that a function-in is of type enum. Link to comment Share on other sites More sharing options...
Rivka Posted April 8 Report Share Posted April 8 Please note that although you cannot force the user to use the function correctly, you can guide him to do so, using comments on parameter In and Out, and run-time checking, as follows: Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now