Posted 28 Oct 2020 Dear members , 1.)I have sensor which i read it from analog input (0-10v) specific value and i will pas it via analog output (0-10) to controll VFD for air spped controll . so i'd like to keep specific value for example i will set value 260 , so if analog read les that this value than analog output increase voltage to analog output , if analog read more than this value output decrease voltage . 2.) i have Digital to analog register D8096 which 0 value means 0 volt and 4090 means 10v , so when i need to pas value to i make MOV D200 D8090 , is there a posibility to limit write value to D200 to not pass 4090 ? Share this post Link to post Share on other sites
Posted 2 Nov 2020 Good afternoon, I am not really sure I understand your first question, as far as I can tell, you want to increase or decrease the analog output for your VFD in order to match your desired sensor reading. In that case, I would set a certain tolerance range, for example, if your desired value is K260, the tolerance range would be K250~K270. From your second question, let's say that D200 contains the value that will be sent to your analog output and that D100 contains your analog sensor reading. -|< D100 K250|---|SM413|---|INCP D200|- -|> D100 K270|---|SM413|---|DECP D200|- In Mitsubishi Q-Series CPU, SM413 is a flag value that pulsates every certain amount of time. When this pulsates, you will read your analog sensor input and increase or decrease the value of D200, which will be sent to your analog output. You should be careful when determining the polling time based on your system's response time. In this case, I set it to about a second or so, but if your system can't respond quickly enough, you will be constantly overshooting and undershooting your target. For your second question, I'd recommend checking for negative values as well, something like this: -|< D200 K0|---|MOV K0 D8090|- -|>= D200 K0|---|<= D200 K4090|---|MOV D200 D8090|- -|> D200 K4090|----|MOV K4090 D8090|- I hope this information is helpful to you, best regards. Share this post Link to post Share on other sites