diferenta dintre pzd si pkw

2
If I want to explain the differences as simply as I can, I should mention that the PZD (Process data) has t First one is used to send and receive the set point, and the second one is used to send and receive drive s example O, OFF, !"#D$, F#%&' and ...). ut in P * (Parameter identifier value), you can use + words to Read orWrite parameters value (for example motor parameters, rated speed and ...). 'he first two words are used to identify the parameter num er and the la words are used for parameters value. 'he i--est pro lem in P * communication is how to read or write parameters value. 'he first time, when I to use P *, I had a lot of pro lems /ere, I will explain it asically. 'here is + words in P * for input and output. For example 0*123, 0*12+, 0* 124 and 0* 125 are defined for outputs and I*123, I*12+, I* 124 and I* 125 are defined for inputs. 0*123 and 0*12+ are used for parameter num er and 0*124 and 0*125 are used for parameter value. If you want to read the value of a parameter, first you should convert the parameter num er from D"6 to /" example we want to read the parameter num er 825 (it refers to Profi us address), the /"7 format of 825 is 'hen we should send 7984 to 0*123 that 7 is 2 for read and 3 or 9 for write. For example to read the value parameter num er 825, 0*123 would e 2984. For the second word (0*12+), we have 7$Z$ that 7$ is : for parameter num er under 3::: and 5: for paramete num er etween 3::: and 9888. Z$ is index num er for some parameters that need index and it could e :2, ; . If you want to read a parameter value, 0*124 and 0*125 are not used, ut for writin- a value in a paramete num er we should use these two addresses to send the value and I will explain it later For input addresses, I*123 and I*12+ are used to receive parameter num er and I*124 and I*125 are used to receive parameter value. If the value is a word, we can calculate it y convertin- the value of I*125 for ut if the value is dou le word, it is not as simple as sin-le word and this is the pro lem First of all, we have a asic formula< =alue>(si-n)?Power?@ Do O' For-et this formula If you want to read the dou le word, first you should convert these two word to its< I*124 ; I*125 AB it92 ; it:: it92 is the si-n (: is positive and 2 is ne-ative). it9: to it39 (5 its) should e convert to D"6 and we named it P and then we can calculate the power y formula< Power>3C(PA23 ). it33 to it:: should e convert to D"6 and we named it !. 'hen we can calculate @ y this formula< @>2E( (3C39)) ow we have Gi-n, Power and @ and we can calculate the value y =alue>(si-n)?Power?@. "xample< !eadin- from parameter P2:53 (2:53 > +9# (hex)) P!OFI %G >B @I6!O@#G'"! < 2+9# :::: :::: ::::, reHuests the value from P2:53. 2+9# AB 0*123 :::: AB 0*12+ :::: AB 0*124 :::: AB 0*125 @I6!O@#G'"! >B P!OFI %G < 3+9# :::: +3+5 :::: 3+9# AB I*123 :::: AB I*12+ +3+5 AB I*124

Upload: mihai-popescu

Post on 06-Oct-2015

10 views

Category:

Documents


0 download

DESCRIPTION

test

TRANSCRIPT

If I want to explain the differences as simply as I can, I should mention that the PZD (Process data) has two words. First one is used to send and receive the set point, and the second one is used to send and receive drive status (for example ON, OFF, READY, FAULT and ...).But in PKW (Parameter identifier value), you can use 4 words toReadorWrite parameters value (for example motor parameters, rated speed and ...). The first two words are used to identify the parameter number and the last two words are used for parameters value.The biggest problem in PKW communication is how to read or write parameters value. The first time, when I wanted to use PKW, I had a lot of problems! Here, I will explain it basically.There is 4 words in PKW for input and output.For example QW512, QW514, QW 516 and QW 518 are defined for outputs and IW512, IW514, IW 516 and IW 518 are defined for inputs.QW512 and QW514 are used for parameter number and QW516 and QW518 are used for parameter value.If you want to read the value of a parameter, first you should convert the parameter number from DEC to HEX. For example we want to read the parameter number 918 (it refers to Profibus address), the HEX format of 918 is 396. Then we should send X396 to QW512 that X is 1 for read and 2 or 3 for write. For example to read the value of parameter number 918, QW512 would be 1396.For the second word (QW514), we have XYZY that XY is 0 for parameter number under 2000 and 80 for parameter number between 2000 and 3999. ZY is index number for some parameters that need index and it could be 01, 02, .If you want to read a parameter value, QW516 and QW518 are not used, but for writing a value in a parameter number we should use these two addresses to send the value and I will explain it later!For input addresses, IW512 and IW514 are used to receive parameter number and IW516 and IW518 are used to receive parameter value. If the value is a word, we can calculate it by converting the value of IW518 for HEX to DEC. But if the value is double word, it is not as simple as single word and this is the problem!First of all, we have a basic formula: Value=(sign)*Power*MDo NOT Forget this formula!If you want to read the double word, first you should convert these two word to bits:IW516 IW518->Bit31 Bit00Bit31 is the sign (0 is positive and 1 is negative).Bit30 to Bit23 (8 bits) should be convert to DEC and we named it P and then we can calculate the power by this formula: Power=2^(P-127).Bit22 to Bit00 should be convert to DEC and we named it R. Then we can calculate M by this formula: M=1+(N/(2^23))Now we have Sign, Power and M and we can calculate the value by Value=(sign)*Power*M.Example: Reading from parameter P1082 (1082 = 43A (hex))PROFIBUS => MICROMASTER : 143A 0000 0000 0000, requests the value from P1082.143A->QW5120000 -> QW5140000 -> QW5160000 -> QW518MICROMASTER => PROFIBUS : 243A 0000 4248 0000243A ->IW5120000 ->IW5144248 ->IW5160000 ->IW517the response indicates that it is a double word (2in 243A indicates the double word) with the value 4248 0000.To read this double word we use the above formula:Value=(sign)*Power*MIn this example, 4248 0000 is bit format is0100 0010 0100 1000 0000 0000 0000 0000Bit31=0 -> sign=1.Bit30 to Bit23=1000 0100 -> P=132 -> Power=2^(132-127)=32Bit22 to Bit00= 100 1000 0000 0000 0000 0000 -> N= 4718592 -> M=1+(4718592/(8388608))= 1.5625.Then Value=(sign)*Power*M= (1)*32*1.5625=50.