Hi,
everyone,I have some troubles,can you give me some advice? I have a clipper,The Clipper Board +/-10V DAC outputs are produced by filtering a PWM signal.I want to control a PMSM with the filtered PWM.
here is my code.
I7000 = 1001
I7001 = 5
I7002 = 3
I7003 = 1746
I7100 = 1001
I7103 = 1746
I7016 = 0
I10 = 3421867
I100=0
I124=$120001
p1=0
m102=0
While (p1 <10000)
m102=1000
p1=p1+1
If (p1 = 10000)
disable plc1
EndIf
EndWhile
enable plc1
by running this program,I found that the output voltage between J3 PIN29(ADC1) and J3 pin48(GND) can be controlled by the M102 variable.But the clipper can not receive the encoder signal, when I rotate the motor by hand,the position window shows 0.0cts. then I set the I100 to 1 and rotate the motor by hand again,the position window shows the correct number of counts.BUT there is another problem,I found the value of M102 is 0 and can not be changed. I don't know why this happen,is there somebody give me some advice?