Sign in to follow this  
Followers 0
asterof

PLC5 indirect bit conversion to CLX

7 posts in this topic

Any one have an idea how to convert this from PLC5 to CLX Thanks

Share this post


Link to post
Share on other sites
It's exactly the same. Create and array of Bools (Let's call it "BoolArray[255]") and create an integer (Let's call it "Int"). For you tag, just write is down as "BoolArray[int]". Best of luck!

Share this post


Link to post
Share on other sites
I tried that, I created an INT index_A and assigned the N15[10] to it then tried B10.index_A does not work you see here the value of N15[10] represent a bit location of 0 - 1184 because B10 has 75 words so this is a pointer to any bit with in that range so if currently N15[10] is equal to 200 then it would read B10.200 in CLX or B10/200 id PLC5

Share this post


Link to post
Share on other sites
Is B10 an array of bools? If so, you need to write is as "B10[index_A]", not "B10.index_A"

Share this post


Link to post
Share on other sites
No it is an array of Binary B10:0, B10:1, xxxxxxxxxxxx

Share this post


Link to post
Share on other sites
There is no data type 'binary'......and if you created an array of integers to duplicate the B10 registers you can't indirectly address the bits. You need to work on it not as word/bit but as /bit only....in that case b10:1/2 is also b10/18......you create an array of BOOL B10[xxxx] as BOOL. Then you can address it in the program as B10[index].

Share this post


Link to post
Share on other sites
Actually, if you There is no such thing as "B10:0" in a Controllogix, so I have no idea what you are trying to say in that sentence. You're writing short phrases without much description, which makes it very difficult to help you. What does it look like in the control logix? Is it an array of BOOLs or an array of DINTs? If it's an array of BOOLs (which is what you WANT in this circumstance), then, as I mentioned, it should look like B10[index_A] If it's a single DINT (which could work if you need less than 32 bits), it should look like B10.[index_A] If it's an array of DINTs (which is NOT what you want in this circumstance) then it should look like B10[index_A].[index_B], or B10[0].[index_B], or B10[index_A].0 (where you replace 0 with the number of your choice) OK I've pretty well covered all the options, I'm pretty sure you'll find something that works for you here. Please don't try and use semicolons or slashes. Edited by MrAutomation

Share this post


Link to post
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
Sign in to follow this  
Followers 0