
adccommunitymod (AutomationDirect) asked a question.
Created Date: July 01,2008
Created By: theschmu
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I have a F2-4AD2DA module. I am doing some experiments to learn how to use this. I have a 0-20mA generator. I have hooked everything up like in the diagrams from the PLC and the generator. The values all match the correct slot number. I have a C-more and am just programming the calculation to convert from the mA signal back into the mA to display on the C-more. So far, I can get whole number mA's to display. I am trying to use the scaling option in C-more and altering the calculation to add significant digits. So far, it is disappointing. I know it is a simple explanation. Any help? Thanks for helping a newbie!
Created Date: July 01,2008
Created by: hanziou
It sound like your issue has more to do with Scaling the C-more than analog issues.
I have used the older EZ-Touchscreen and the Cmore Mirco, so I might miss on some particulars, but....
If your tag is an integer, then you will only be able to display whole number. You probably have control of where the decimal point is paced. SO you can specify that the Cmore will display the value with two digit right of the decimal point. In your scaling the PLC Values will be 0 and 4095 and the Display values will be 400 and 2000 (Not 4.00 and 20.00).
Hope this made sense.
Good Luck
Created Date: July 02,2008
Created by: Thomas E. Jenkins
You can't get more resolution out of the display than you have in the PLC. You have a several choices.
One is to multiply the value of the raw data (0-4095) by ten before you scale to engineering units. That will give you an implied decimal place (123 => 12.3). Then use one decimal place in the display to show 123 as 12.3. This is the method I prefer, as it allows me to use the engineering units in my program directly.
A second option if you only want a display is to use the scaling option of the C-More to convert the raw data. 0 PLC = 0 C-More, 4095 PLC = 200 C-More. Again use one decimal place in the display so 200 shows as 20.0
Finally, you could use floating point math in the PLC and the display.
Created Date: July 02,2008
Created by: theschmu
I have tried the scaling. It seems it is cutting off sig figs on input. The tag is reading at BCD integer. Multiplying by 10 just gives me another zero, not adding values as in the book example. As far as displaying the raw numbers, i am inputting 5mA (verified by multimeter) which calculates to a raw number of 255.94 counts. I am reading between 259 and 260. I have not tried hooking the negative wire to the chassis ground to see if that brings in the resolution. I cannot try floating point math right now. I have a 260 cpu, which will not talk to my stripped cmore 6 ", as i have other things hooked to port 2. I assumed i could hook the cmore to port 1, but no luck there. Perhaps a second post about that topic. So I swapped in a 240 cpu i had around, which does not do floating point. I was able to get more numbers when i had the tag set up to a regular integer, but those numbers were incorrect. BCD got me better numbers, but fewer of them.
Created Date: July 02,2008
Created by: theschmu
I have the module in slot 2, third from the cpu. There is an 8 point input in slot 0, and a filler in slot 1. I was trying to get the x ranges proper. Does the fill count as 8, or have i screwed that up, which drops value?
Created Date: July 02,2008
Created by: Andy
Neither the filler module nor an empty slot consumes any I/O points. If you are using the default automatic addressing mode the CPU assigns the required I/O points to the module as it sees them from left to right.
Andy
Created Date: July 02,2008
Created by: Thomas E. Jenkins
Originally posted by theschmu:
I have tried the scaling. It seems it is cutting off sig figs on input. The tag is reading at BCD integer. Multiplying by 10 just gives me another zero, not adding values as in the book example. As far as displaying the raw numbers, i am inputting 5mA (verified by multimeter) which calculates to a raw number of 255.94 counts. I am reading between 259 and 260. I have not tried hooking the negative wire to the chassis ground to see if that brings in the resolution. I cannot try floating point math right now. I have a 260 cpu, which will not talk to my stripped cmore 6 ", as i have other things hooked to port 2. I assumed i could hook the cmore to port 1, but no luck there. Perhaps a second post about that topic. So I swapped in a 240 cpu i had around, which does not do floating point. I was able to get more numbers when i had the tag set up to a regular integer, but those numbers were incorrect. BCD got me better numbers, but fewer of them.
What is the range of numbers you want as a result of the scaling?
You cannot exceed 4 digits resolution (9999) with integers. If you need more resolution you will either need double integers or real numbers. I suggest the latter.
You should be able to tie the C-More to port one. You need to use K-Sequence protocol with the PLC default comm settings.
Created Date: July 02,2008
Created by: theschmu
in order to do that, do i need to change the data coming into the plc from 0402 (bcd) to 8482 (binary) and convert/math with larger numbers before re-converting and outputting to the cmore? Yeah, I am a newbie....surprise! Thank you everyone for your answers.
Created Date: July 01,2008
Created by: theschmu
I have a F2-4AD2DA module. I am doing some experiments to learn how to use this. I have a 0-20mA generator. I have hooked everything up like in the diagrams from the PLC and the generator. The values all match the correct slot number. I have a C-more and am just programming the calculation to convert from the mA signal back into the mA to display on the C-more. So far, I can get whole number mA's to display. I am trying to use the scaling option in C-more and altering the calculation to add significant digits. So far, it is disappointing. I know it is a simple explanation. Any help? Thanks for helping a newbie!