When PLC rack is inserted in PLC manager, slots startwith number 1.
If I use Allen-Bradley PLSs, the module numbers start with 0. So all the addressing is screwed up.
Is it possible to change module numbers? Is there a work around?
If I go to module properties, after insertion, and chalge slot number, the module dissapers from PLC manager, but still present in the Components tree!!!
Alex,
When you move modules around, they have not disappeared but have rather either doubled up or are not with the current card position number. You may go the the properts of the PLC,look at the parts and edit their card position directlyand when you return to the plc editor, things will be present.
For having the numbers start at zero, there is no fix for this. However, I assume you are using that value to calculate address. In this case there IS a solution.
I believe the card position variable is COM_VAL1. when writing your formula you should convert com_val1 and do some math. Here's an example using the default formula.
Default formula = CHAN_TYP + ":" + COM_VAL1 + "." + CHAN_ADDR
New formula = CHAN_TYP + ":" + STRZ(VAL(COM_VAL1)-1,2,1) + "." + CHAN_ADDR
The new formula will convert com_val1 into a number so it may be used in math. You subtract 1 and then convert it back into a string. This particular formula will always give you a two character value. I personally always do two characters so report columns always look nice and it can help in sorting data. To this, I also recommend changing channel address to STRZ(VAL(CHAN_ADDR),2,1)
Thank you Marc,
I will give it a try in a New Year.
Merry Christmas!