Ramkumar Posted October 12, 2021 Report Posted October 12, 2021 Hi, Is there an instruction equivalent to the bit field distribute in rockwell pls, for mapping bits from one register to another Thanks
panic mode Posted October 12, 2021 Report Posted October 12, 2021 i am not aware of direct replacement but one can compose data in a number of different ways. one of them is to use mask and shift instructions. for more convoluted arrangements it is probably easier and more readable to simply pack things bit by bit using contacts and coils. MOV D4 K4M0 ; copy 16 bits from D4 to M0..M15 then use LD/OUT to remap the M bits to some other place (M100..M115 for example) with order you like and move it back using MOV K4M100 D5 depending on particular CPU version other options may also exist. and if you like, just make own function that duplicates BTD exactly
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