netdomain Posted April 12, 2007 Report Posted April 12, 2007 Hi all, I want to scale my analog value from 0 to 10 volts to 0 to 70 PSI. I have dealt with Allen Bradley where I used a Scale Command to do that. How do I do this in Mitsubishi? Any Scale Command or similar? Thanks Quote
504bloke Posted April 12, 2007 Report Posted April 12, 2007 It depends on the PLC I just used an FX2N on a Job with the 8AD fitted and on this you would set the module up to read the data direct into the plc in whatever units you required ie 0-70 or 0 to 7000 (implied dp 70.00) The 8AD was set up with the FROM / TO Commands Quote
Crossbow Posted April 12, 2007 Report Posted April 12, 2007 There is no dedicated command for scaling. Typically I convert the numbers to floating point, determine the multiplier (like 70/2000 if as you stated value is 0-70 (and input module value is 0-2000), then multiply the unscaled value by that decimal value. Convert input to floating point with [FLT D0 D8] (if D0 is where you store it) So 0-2000 scaled to 0-70 would be 0.035. Use a calculator or put it in code as [E/ K70 K2000 D10] Then multiply your incoming value by that 0.035 and you'll have a scaled value. [E* D8 D10 D12] You can always then convert that number to integer with the INT command. [iNT D12 D1] Then D1 contains an accurately scaled (but rounded) integer value. D12 contains an accurately scaled floating point number. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.