Sign in to follow this  
Followers 0
travish

analog data confusion

6 posts in this topic

I have a L35 Compactlogix using Numatics G3 fieldbus IO. The Numatics IO is 9 digital input modules, 3 output modules and 1 analog input module. The module is a 4 channel 0 - 10v input module. All of the digital IO works perfectly. Looking in rslogix5000 all of my data from the G3 system shows up as 32bit words, so there are 4ea 8 bit rows in each word. So the 4 analog inputs use 8 bytes, 2 bytes for each input. Each input is a 16 bit value, example word 11 11111111 11111111 11111111 11111111 word 12 11111111 11111111 11111111 11111111 My 1st analog input is the value of the last byte of word 11 and the 1st byte of word 12, the next input is row 2 and 3 of word 12 so how do i look at the value of input #1? Thanks for your help Travis Edited by travish

Share this post


Link to post
Share on other sites
Create a Tag AnalogValueOne and use the BTD Instruction to relocate the portions of word 11 and word 12 to it that matter. I'd start with a DINT for AnalogValue One, but you may want it to be REAL.

Share this post


Link to post
Share on other sites
thanks Bob, I will let you know how it worked Travis

Share this post


Link to post
Share on other sites
I am still doing something wrong. I incorrectly gave the word 11 and 12 last week, it is actually 12 and 13 for input 1. I moved to input 2 so that both Bytes of data would be in the same word. Open the attached program and look under the file called "Drives" on rung 31 is my BTD instruction. Looks like it works but something is not corect, because when watching it count i occasionally see a number way out of progression, like maybe it is counting around 50k and I see a 20k number flash up for just a second and then continue back at 50k. You will also see I added a few rungs under the BTD to make sure which BYTEs were counting. the analog input is a Turck RI360 rotory prox sw that should give 0 - 10. This works correctly when I check it with my meter, so I feel it is not the reason the count jumps around sometimes. I know it goes all the way to 10 and starts at zero, so notice under the BTD instruction it looks like the value never went below 214 or above 65276, Do you see anything I am doing wrong? thanks Travis Slat_Welder.ACD

Share this post


Link to post
Share on other sites
You have stated that each analog input provides 2 X 8 bits (2 bytes) of data (16 bits); within your posted application file, the destination of the BTD instruction (analog_1_pieced_value) is a DINT (double integer- 32 bits) Data Type tag. DINT data types are native to the Logix systems, however, when the BTD is "extracting" 16 bits and deposits them within a 32 bit tag the results are different than when the Destination is an INT Data Type tag. For example if your analog input value is (1111 1111 1111 1111) and you BTD it with an INT Data Type destination, the decimal "result" will be: (1111 1111 1111 1111) INT = -1 however, since "analog_1_pieced_value" is a 32 bit tag, the result of your BTD would be (0000 0000 0000 0000 1111 1111 1111 1111) DINT = 65535 In conclusion, the Destinations of your BTD instructions should be INT Data Type tags in order to properly "map" the data generated by the Fieldbus Analog I/O.

Share this post


Link to post
Share on other sites
thanks I went out and slowed the motion way down and tried to watch the input value progressing slowly, and it looks like the jumping that I occasionally see occurs at the transition from 0 to 10 may can get around this with a couple of less than and greater than. I will change the format and let you know Travis

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
Sign in to follow this  
Followers 0