AB 1734-VHSC5 Question

K.C.

Guest
K
Howdy,
I am programming a machine using an AB Micrologix 1500 and AB DeviceNet 1734-VHSC5 Very High Speed Counter Modules to communicate to encoder type measuring probes. The input word for the DeviceNet Scanner is one 16-bit word per module (I:1.66, I:1.67...etc). The input word for each module of the counter is a 32-bit double or long word. How can I read a 32-bit word into a 16-bit word? Any help would be greatly appreciated as this doesn't make any sense to me.
Thanks, K.C.
 
If your count happens to be less than 32767, you could just MVM (Masked Move) 15 bits of the first Input Word into an Integer Register in the MicroLogix 1500. Don't move the 16th bit because it represents a sign in a 16-bit Integer.

Otherwise, the MicroLogix 1500 has two features that will help you:
The Long Integer data type (Lxx:yy) and
the Copy Words instruction (CPW).

You'll actually need two instructions to do this; the CPW instruction does not accept discrete Input data table elements as inputs.

So, perform first a COP (File Copy) instruction of two words from the 1769-SDN discrete input map table (I:1.66-77, for example) into a holding register, such as N7:0-1.

Next, perform a CPW (Copy Words) instructions from N7:0 to a Long Integer register (like L10:0). The Length will be 2, because you're counting 16-bit Words in this instruction.
Code:
                    +--COP--------------+
--------------------|Copy File          |
                    |Source     #I:1.66 |
                    |Dest         #N7:0 |
                    |Length           2 |
                    +-------------------+

                    +--CPW--------------+
--------------------|Copy Word          |
                    |Source       #N7:0 |
                    |Dest        #L10:0 |
                    |Length           2 |
                    +-------------------+

That will put your 32-bit Long Integer value from the DeviceNet scanner input table into a register where you can use it as an argument in ladder logic or view it online.
 
Ken,
Thanks a million. It makes perfect sense to me now. I had never used the CPW instruction before. This should work quite nicely for me. Again, thanks a million.

K.C.
 
Both the CPW instruction and the Long Integer data type are unique to the MicroLogix 1200 and 1500 controllers, so most SLC users aren't aware of them until they have a use for them in those controllers.

I'm spoiled now and want those features in the modular SLCs....
 

Similar Topics

Hello, awhile back I installed a 1734VHSC5 using the two module setup to ease the wiring to the input module (non-contact laser encoder). I have...
Replies
4
Views
2,050
Looking at installing point io, with a 1734-AENTR communications adapter and ten 1734-IT2L modules. In IAB it installs a 1734-EP24DC after every...
Replies
1
Views
44
Hi everyone, new to forum. Since very long time i having issue with 1734-AENT module, after some period of time its keep stuck in error (simmilar...
Replies
16
Views
582
I am trying to use the 4-20 mA signals from a device whose user manual says that it outputs "isolated 4-20 mA". I only have spare PLC inputs in a...
Replies
3
Views
228
Hello The plant is running and there is no shutdown nowadays therefore I can add 1734- AENTR and its card while PLC is in Run? I do not wanna...
Replies
8
Views
347
Back
Top Bottom