0% found this document useful (0 votes)
20 views4 pages

AN1004 Decoding The IO Status Byte Using SyPT Lite

Uploaded by

Dat Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views4 pages

AN1004 Decoding The IO Status Byte Using SyPT Lite

Uploaded by

Dat Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Control Techniques

Application Note
Division of Nidec Motor Corporation
UnidriveSP, Commander GP20 & Commander SK
7078 Shady Oak Road
AN1004
Eden Prairie, MN 55344-3505 USA
Rev.1, 2/19/18
T: +1 952 995-8000
[Link]
This Application Note applies to UnidriveSP, Commander GP20
And Commander SK Series Drives using SyPT Lite

Decoding the I/O Status Byte


Introduction: Parameter Pr 8.20 in the Unidrive SP and Commander SK provides a status byte that
reveals the status of the terminal strip inputs and outputs all within 1 byte. This can be a convenient
register to pass via communications to a PLC or HMI to efficiently convey the information on the status
of the I/O versus addressing each I/O point individually. Another purpose of this data byte would be
allow one to observe the status of the I/O visually however there is one problem- this data byte is
expressed in decimal. For example if the UnidriveSP Terminals T24,T25 and T26 were active, Pr 8.20
would read 7. If the same terminals were active and the Relay output active, Pr 8.20 would read 71
(64+7).

This byte is used to determine the status of the digital I/O by reading one parameter.
The bits in this byte reflect the state of Terminal Strip I/O

For CommSK For Unidrive SP


Bit Binary Digital I/O Digital I/O
0 1 B3 input/output T24 input / output 1
1 2 B4 Input T25 input / output 2
Lo2Nibble 4 B5 Input T26 input / output 3
3 8 B6 Input T27 input 4
4 16 B7 Input T28 input 5
5 32 T29 input 6
Hi Nibble 6 64 Relay Output Relay Output
7 128 T22 24 V output

Unless one was well versed in Decimal to Binary conversion, the data byte in Pr 8.20 is not as useful
as a straight binary representation of the corresponding Terminal pin status.

For instance, if one were to look at a UnidriveSP register representing the LoNibble of this byte and
see:
0111

They would come to the conclusion that Terminals T24,T25 and T26 were active

and if one were to look at a register representing the HiNibble of this byte and see 100, then one
would conclude that the Relay Output is also active.

This would be the same if Pr 8.20 read 71 or (64+7) 0100 0111

Objective:
Hi Nibble Lo Nibble
This application note will illustrate a method to decode the decimal representation of Pr 8.20 into 2
binary nibbles (collection of 4 bits – a Hi and Lo Nibble) which is inherently easier to visually interpret.

7078 Shady Oak Road, Eden Prairie, MN 55344-3505


+1 952 995-8000 [Link]
1
Implementation

SyPT Lite has several useful function blocks to assist with this conversion. Firstly there is a Decimal
to Binary decoder and an adjustable Shift Register. Both will prove key to this implementation.

The first step that I took was to decode the status register which consists of a decimal number.

This decodes into the Upper nibble by


shifting #8.20 left by 4 bits This then decodes into a
hi nibble

Now what one can do is synthetically create a decimal number that are powers of 10 based on the bit
position of the nibble. I decided to place each of these weighted values in separate registers (Pr 18.07-
18.10) then sum them all up into a register I called LowNibble.
LowNibble.

7078 Shady Oak Road, Eden Prairie, MN 55344-3505


+1 952 995-8000 [Link]
2
Then I did the exact same thing for the more significant bits to become the Hi-Nibble.

Register Assignments

Status Word expressed in binary can be observed here

LoNibble #18.01
HiNibble #18.02

Bit0 #18.31 #18.07 thru #18.10


Bit1 #18.32 temporary
Bit2 #18.33
Bit3 #18.34
Bit4 #18.35
Bit5 #18.36
Bit6 #18.37
Bit7 #18.38

In order to observe the Lo and Hi nibble, from the Commander SK on would need to set
Pr71 = 18.01
Pr72 = 18.02

And observe the Lo and Hi Nibble at Pr 61 and 62 respectively

7078 Shady Oak Road, Eden Prairie, MN 55344-3505


+1 952 995-8000 [Link]
3
Embellishment

However, we can do this programmatically as well using the rung of ladder as shown below:

This assignment obviously does not need to be done in the program but if there is room and nothing
else needs done in the ladder, it makes setup automatic.

The above rung simply moves 1801 into Pr 11.01 which is the same as Pr 71
and moves 1802 into Pr 11.02 which is the same as Pr 72.

Summary

From this SyPT Lite example, one should realize that if the base drive does not have a certain desired
function, often you could create your own functions required using the built-in PLC ladder functionality
provided by SyPT Lite.

Disclaimer

The SyPT Lite examples provided here are just that, examples. They can be used for reference
when creating your own application solutions. Control Techniques does not warrant these
examples “as is” for actual use. The examples are intended to stimulate ideas and facilitate
application solutions. One always needs to consider and test all aspects of a system
implementation to insure integrity and safety of their particular intended application.

Resources: can be found on our website: [Link]


For help contact [Link]@[Link], or
call Technical Support at 952-995-8000, 24/7/365

7078 Shady Oak Road, Eden Prairie, MN 55344-3505


+1 952 995-8000 [Link]
4

You might also like