November 8, 200421 yr Hi AllI want to use 12 position mechanical rotary switches for my avionics panel. They are wired for three buttons but I don't know how to program them. I got this sample code for a Rotary Switch in EPIC but it will not compile. Can anyone tell me how to get what I am trying to do.#define FASTSCAN 0definemodule(0,FASTSCAN,0,7):commplus{ keyhit(EQUAL);}:commminus{ keyhit(KBMINUS);}rvar (last_pos,0)rvar (last_pos,1)rvar (last_pos,2) :comm_pos0{ ifvar(last_pos,EQU,2) call commplus else commminus setvar(last_pos,0) }:comm_pos1{ ifvar(last_pos,EQU,0) call commplus else commminus setvar(last_pos,1) }:comm_pos2{ ifvar(last_pos,EQU,1) call commplus else commminus setvar(last_pos,2) }definebutton(16,on,comm_pos0)definebutton(17,on,comm_pos1)definebutton(18,on,comm_pos2)Any help on this would be much appreciated.Best regards,Steve K. (ifrevets)
November 9, 200421 yr Post that question at http://www.simengineers.com/yaf/default.aspx you will get your answers
November 9, 200421 yr Author Hi Arthur PratherThank you for the information. I will give it a try.Regards,Steve K (ifrevets)
Create an account or sign in to comment