Poligon Valve Linearization
Jump to navigation
Jump to search
Download Project Files
What You Need to Know Before Design
Diagram Algorithm
- The input value is parametrically calibrated at ten different points and transferred to the output.
Diagram Solition
- Some sections are explained from within the macro. The entire macro is in the project.
- [v0=$3000b0] // Controls whether the value in the register with block number 3000 is equal to or greater than 0. If the condition is satisfied, the v0 variable becomes 1.
- [v1=$3000<10] // Controls whether the value in the register with block number 3000 is less than 10. If the condition is satisfied, the v1 variable becomes 1.
- [v2=$3000b10]
- [v3=$3000<20]
- ...........
- ...........
- ...........
- [v20=v0&v1] // Variables 'v0' and 'v1' are subjected to 'And(&)' operation. If the condition is satisfied, the v20 variable becomes 1.
- [v21=v2&v3]
- ..........
- ..........
- ..........
- [IF,v20,17]
- [v30=$3001-$3002] // The value of the register with the block number 3002 is subtracted from the block number 3001. The result is written in variable v30.
- [v31=$3003-$3004]
- [v32=v31/v30] // The value of the variable v31 is divided by the value of the variable v30. The result is written in variable v32.
- [v33=$3000-$3002]
- [$0=1+0] // If the block number is 0, the value of the register becomes 1.
- [$1=0+0] // If the block number is 1, the value of the register becomes 0.
- [$2=0+0]
- [$3=0+0]
- [$4=0+0]
- [$5=0+0]
- [$6=0+0]
- [$7=0+0]
- [$8=0+0]
- [$9=0+0]
- [$5008=v32*v33] // Variables v32 and v33 are multiplied and written into the block numbered 5008.
- [E] // Macro operations end
- ..........
- ..........
- ..........
- [E]