captainpatje

Converting digital output from FX2N-2AD module to mm

7 posts in this topic

Hi,

 

We have a company that is specialized in bandsaw machines, this is one of those machines:

https://lintzagenservice.nl/wp-content/uploads/2019/11/Cosen-C-520NC-NO-BG-768x512.jpg


What we have done is hook up a wire encoder to the saw bow and the other end of the wire on the base of the machine. You can see a picture of it in the attachment.

I have followed the manual of the FX2N-2AD module, the wire encoder requires the current input from 4-20mA, and I am getting a digital output, but this needs to be converted to show in millimeters on the HMI. Unfortunately I am only learning how to do this, and am not an expert in Mitsubishi PLCs (yet).

Currently the only code we are using in PLC for reading the 2AD module is found in attachment.

TLDR: Wire encoder giving a digital output, but now need code that can convert this value into mm.

 

 

WhatsApp Image 2020-03-02 at 16.45.45 (1).jpeg

WhatsApp Image 2020-03-02 at 16.45.45.jpeg

Naamloos.png

Share this post


Link to post
Share on other sites

All you have to do is give it an offset and Gain. You can do this is the PLC but as this is for displaying it on the HMI. 
You should also have this function in the HMI. Are you using a Mitsubishi GOT ?

What is the range of the Digital value vs mm

Edited by Gambit

Share this post


Link to post
Share on other sites
1 hour ago, Gambit said:

All you have to do is give it an offset and Gain. You can do this is the PLC but as this is for displaying it on the HMI. 
You should also have this function in the HMI. Are you using a Mitsubishi GOT ?

What is the range of the Digital value vs mm

Hoi Gambit,

Even though we are both Dutchies I will continue in English.

When the sawbow is down, which would amount to 0 mm, the plc has a digital value of 502.

Can you tell me how to adjust it to be correct? I have already played with some offset/gain but I don't really understand how that works.

Thanks!

PS. Not using Mitsubishi GOT, using some HMI called Pingtung (Chinese brand). Software also gives me possibility of offset/gain, but rather do it via screws on the module.

5e60bc417adbb_sawbowdown.thumb.png.f9e2c

Edited by captainpatje

Share this post


Link to post
Share on other sites

No problem but i also need a point to make the offset gain

0mm = 502 
100mm= xxxx

For Instance
0- 4000 in the PLC should be a range of 10 - 20 bar
so 0 = 10 and 4000 =20
For this example the gain = 0.0025 and the offset 10 
because if the value for instance would be
2000 (2000 x 0.0025)+10= 15 (bar)
 

 

Share this post


Link to post
Share on other sites
16 minutes ago, Gambit said:

No problem but i also need a point to make the offset gain

0mm = 502 
100mm= xxxx

For Instance
0- 4000 in the PLC should be a range of 10 - 20 bar
so 0 = 10 and 4000 =20
For this example the gain = 0.0025 and the offset 10 
because if the value for instance would be
2000 (2000 x 0.0025)+10= 15 (bar)
 

 

Okay!

Highest point of the sawbow = 54mm

54mm = digital value 589

Share this post


Link to post
Share on other sites

54mm=589

1mm=589/54=10.7090909

so you can divide digital value with 10 .7090909. Then you can get mm value

Edited by Nigher

Share this post


Link to post
Share on other sites

0 = 502 
54 mm = 589 

your offset would be  -311.586

your Gain would be 0.62069

 


27 mm should be 545,5 (calc 545,5 x 0.62069)-311.586 = 27.0000395

Edited by Gambit

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now