Hello Guest it is March 28, 2024, 10:33:19 AM

Author Topic: Using decimals in and setting modbus address using brains  (Read 3629 times)

0 Members and 1 Guest are viewing this topic.

Using decimals in and setting modbus address using brains
« on: May 11, 2014, 11:02:57 AM »
Good morning everyone.  I'm posting this under modbus because my brain is basically used for modbus.  I have two questions at this time.

1.  I installed an optical sensor on both my Mill and Lathe.  They are Omron EE-Sy671 and EE-SY672.  There is a slight difference in the Actual RPM and the RPM that the drive is reporting.  I need to put a correction factor into my Brain to be able to match the RPM sent with the S command from Mach 3 and actual RPM.  One of my correction factors is .93.  When I use the Brain rung putting a formula in to the run of E*.93 or E*0.93 the result when I view the brain is a number over 9000, and it runs the drive to max output.  Is it possible to use decimals in a brain to create a correction factor?  If so, any ideas?

2.  Now that Mach4 is reading the actual RPM, I'd like to also read it into my Magelis touch screen.  I need to get this value into a modbus address, so I can read it into the Magelis screen.  I have the sensors wired into a Gecko 540 board and its coming into the index parameter in Mach3.  Any ideas on how I can get this value into a modbus address so it can be read into my touch screen?

I attached my brain for reference.  The last rung in the brain is where I'm putting my formula.  I'm changing the No Op instruction to a formula.

Thanks
TeaMan
Re: Using decimals in and setting modbus address using brains
« Reply #1 on: May 11, 2014, 07:56:35 PM »
Update.  I was able to get the correction factor to work.  I added a No Op block before the formula block and everything seemed to work fine.  Not sure why it was needed since I have formulas before this rung without No Op blocks, but that was the solution.

Still trying to get my head around the address to read RPM from Mach4 yet.  Will update if I get that one figured out too.

TeaMan