Sign in to follow this  
Followers 0
smil3y

16 Channel I/O via Scanner

9 posts in this topic

Hi I am relatively new to PLC programming but have managed to complete a few projects successfully. I am currently trying to get a 16 channel analog input module (1746-NI16I) to provide data back to the PLC via a Scanner module (1747-SN) and Adapter (1747-ASB). I am using AB 1747-L553/B/C 5/05 CPU and am able to get the data back using either Channel 0-7 Write and Read Block transfers or Channel 8-15 Write and read block transfers. From this I am assuming I have the PLC configuration set up correctly - and I used this forum to obtain this information. I followed the link in one example to Rockwells Knowledge Base (G18685) to perform the individual channel checks and I then expanded that example to try and get all 16 channels back. For some reason it does not work. I have written the code so that only one block is performed at anyone time. I have attached my test code, can someone please check and see what I am doing wrong. Regards CARBOR3.RSS

Share this post


Link to post
Share on other sites
Two comments: 1. Why not increase the requested word count to 16 instead of 8, and get all 16 channels at once? The SLC Block transfer instruction supports upto 64 words per transfer? 2. If you must keep the two BTR's, you need to change the buffer file on one of them, currently both have M1:4.200.

Share this post


Link to post
Share on other sites
Many thanks My decision to use 8 Channels to configure was based on Chapter 1 Page 1 of the Publication 1746-UM001A-US-P. This states: The 1746-NI16 is a multi-class (Class 1 or Class 3) single-slot module. Class 1(1) configuration utilizes 8 input words and 8 output words. Class 3 configuration utilizes 32 input words and 32 output words. Fixed and SLC 5/01 processors can only operate as Class 1. When the module is used in a remote I/O chassis with a 1747-ASB, it can only operate in Class 1 mode. The SLC 5/02, SLC 5/03, SLC 5/04 and SLC 5/05 processors can be configured for either Class 1 or Class 3. When the module is used in a remote ControlNet™ chassis with a 1747-ACN®, it can also operate in either Class 1 or Class 3 mode. Operate the module in Class 3 mode whenever possible. Although our module is Class 3, because it is used via the 1747-ASB it can only be used in Class 1 mode. Otherwise I think it would be easier to use 16 Channel BTW /BTR. I will try you suggestion about the buffer - I had left this the same because I thought that since I was performing distinct Write and Read steps, the contents of the buffer would have been transferred to the appropriate Data Register before the next write/read was performed. As I stated - I am relatively new and although I am reading the manuals, it is easy to miss vital information and some is not provided. Any suggestions on what buffer settings I could use? I appreciate your assistance. Regards

Share this post


Link to post
Share on other sites
I did as suggested (see attached) and I am now getting data back from the analog input card - although there is still a problem. I can see all sets of Channel status lights flashing which indicates that configuration is being written (is this correct)? I have a 4-20mA source connected to Channel Input 0 and Channel Input 8. When I put an input (4-20mA) into Input 0, I can read the value in N7:200 but the same value also appears in N7:208. If I put the input into Input 8 (second block of eight inputs) I can see the same value in both N7:208 and N7:200. In addition, the data stays stable for approximately 30 secs and then goes to zero before returning shortly after. No errors are occurring. Any ideas please?? CARBOR4.RSS

Share this post


Link to post
Share on other sites
Okay here's my opinion. You cannot use two BT's of eight words each, that is why you are seeing the same value in two places, you're reading the same work twice! The NI16 is kind of new and I've never used one, but I have used quite a few NI8 modules. Now the NI8 set up as class 1, requires 8 setup words and has 8 output words. I think when they came out with the NI16, they re-used the NI8 manual and some one forgot to change the 8 to 16. So I suggest you try one BTW and one BTR of 16 words each, I'm willing to bet (small change) that will fix everything. Ken

Share this post


Link to post
Share on other sites
Ignore my previous post, I downloaded the manual for your input manual here: http://literature.rockwellautomation.com/i...um001_-en-p.pdf Your correct about the 8 words, it's going to take a lot of ladder programming to get the data you need. The first bit of the input word is used to determine what channel you are reading, You have to write the configuration for the first 8, read them, configure the second 8, read them. After parsing the manual, I made a note to myself to never use this card in a remote chassis, I would use two 8's instead. However, that doesn't help you any, so good luck with your application. If you haven't read the manual, you should. Ken This looks challenging, so if you don't get it working, let me know and I will try to throw something together later in the week.

Share this post


Link to post
Share on other sites
Thanks I will keep at it. Just a note though - my BTW's write different words to the AI module (hopefully the correct word). In addition I have tried BTW/BTR from the first 8 channels independently - works fine - and then the next eight channels independently and that works fine. Until I use the two separate BTWs the indicator LEDs on the front of the AI module (0-3), (4-7), (8-11) and (12-16) do not indicate. Once I write to the channels these LEDs commence flashing. It seems to me that the BTR is maybe the problem. Regards

Share this post


Link to post
Share on other sites
Took another look at your posted code. Since you have to write, then read. I suggest you make your block transfers cascading. You wait until the preceeding transfer is done, before starting the next. See the attached code, download it and give it a shot. Let me know what happens. Ken CARBOR_ken.RSS

Share this post


Link to post
Share on other sites
Thanks Ken. Sorry have not replied earlier have been away. Have downloaded and will advise how it goes once I have tested. Regards

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