Sign in to follow this  
Followers 0
wsy_nte

1746-HSCE2 Setup

18 posts in this topic

Hi... I have to used 1746-HSCE2 that connected to two encoders: 2048 PPR encoder that connected to Channel 0 and assign for length measurement (in mm), and another 1024 PPR encoder connected to channel 1 and used to indicate rotary knife edge position ( 0 - 360 deg). How to configure the 1746-HSCE2 for above requirement? Any idea? Thanks. James

Share this post


Link to post
Share on other sites
HSCE2 card can be nightmare to figure out because manual is so poor. Person who wrote it should be punished (ok i will leave this to you...). First you need to install card, create initialization routine as described in manual 1746-um002_-en-p.pdf All the initialization routine does is transfer series of parameters to card. Parameters are packs of 8 words. Word_0 of each parameter block contains parameter_ID (lower byte), counter number etc. Words 1-7 are data. The actual work is figuring out what numbers to use for parameter block setup. Depending on how many counters are to be setup and what is used (ranges etc.) one will have more or less to configure. Logic is as follows: In your main program (LAD2) add rungs SOR XIC S:1/15 BST MOV 0 N19:0 NXB OTU B3:5/13 NXB OTU B3:3/0 BND EOR SOR XIO S:1/15 XIO B3:3/0 XIO B3:5/13 JSR 3 EOR LAD3 file in this case should contain following logic SOR LES N19:0 N19:1 XIO O:1.0/15 XIO I:1.0/15 BST COP #N18:[N19:0] #O:1.0 8 NXB OTL O:1.0/15 BND EOR SOR XIC O:1.0/15 XIC I:1.0/15 BST OTU O:1.0/15 NXB MEQ I:1.0 6000h 0 ADD N19:0 10 N19:0 BND EOR SOR EQU N19:0 N19:1 XIO O:1.0/15 XIO I:1.0/15 BST COP #N18:[N19:0] #O:1.0 8 NXB OTL B3:3/0 BND EOR SOR BST XIC I:1.0/13 NXB XIC I:1.0/14 BND XIC I:1.0/15 OTL B3:5/13 EOR and you will need files N18 and N19 First one contains parameters for the HSC2 and second one holds just two numbers ("current parameter" and "number of parameters to load"). As you can see two words are wasted since they use only 8 out of 10 words per parameter set block. Order of paramters doesn't really matter as long as you wait with enabling of counters until end (this should be last block of data). Smart thing to do is plan and organize.... For example make first parameter block disable counters, then do all other blocks and in the end enable counters again. This way you don't have to reset or reboot plc to load new parameter set. Just edit parameters in N18 file and retrigger very first rung (add branch with another OSR bit around S:1/15). Anyway, the basic parameters (N18:0..N18:69) would be something like this (well this should be pretty darn close if not spot on for what you asked). 1, 101, 8, 0,0,0,0,0,0,0 ; Setup 2 counters blah blah blah 302, 1c,0,1c,0,0,0,0,0,0 ; Configure Gates 4, DFC3,FDA1,20C4,25E,0,0,0,0,0; Setup range for counter 0 (-8388607...8388606) 104, 0,0,4,5F,0,0,0,0,0 ; Setup range for counter 1 (0...4095) 8, FC18,0,3e7,3e7,0,0,0,0,0 ; Setup rate for counter 0 (-1000000...999999) 108, FC18,0,3e7,3e7,0,0,0,0,0 ; Setup rate for counter 1 (-1000000...999999) 80,8001,8001,0,0,FF00,0FFF,0,0,0; Enable both counters All of these values are HEX. Put value 60 (60 decimal or 3C hex) into N19:1 and you are almost done. Both counter are configured for X4 (gates setup) so you would get 4x2048=8192 and 4x1024=4096 pulses per revolution. First counter uses full range. Second one is using only 4096 pulses (0...4095) because it's single turn (you didn't mention any gearbox). After this you will need to calculate positions: SOR CPT F8:0 ( I:1.2 * 1000.0 ) + I:1.3 EOR SOR CPT F8:1 ( I:1.8 * 1000.0 ) + I:1.9 EOR Scaling values should be simple enough.

Share this post


Link to post
Share on other sites
Thanks for reply. I have to try the code, setup N19:1 = 60 (decimal) and I found the error bit B3:5/13 always set to 1. How to solve this problem? Regards, James

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites
James, what's going on? did you get this thing to work yet? Regards,

Share this post


Link to post
Share on other sites
Hi.. I still have the problem with b3:5/13 always set to 1 after power-up. The n19:0 is 60. The connection to encoder module is A+ A-, Z+, Z-, encoder ppr for both channels is 2000 ppr. Any idea how to solve the problem? Thanks. James HSCE2_Setup.RSS

Share this post


Link to post
Share on other sites
Value in N19:1 must be 60, not 96...

Share this post


Link to post
Share on other sites
Hi.. I change the n19:1 to 60 but the problem still exist. Any idea? Thanks. James

Share this post


Link to post
Share on other sites
i don't see anything wrong with it. your ladder code is ok (in fact it's same as what I was using). parameter loading is ok but it stops when you try to enable counters. is this the only code you downloaded to plc? did you power down and power up plc? your bit B3:23/0 should come on when init is complete.

Share this post


Link to post
Share on other sites
Hi.. I used 2000 PPR encoder for both channels, may this cause the error? Any number need to be change to accomodate 2000 PPR? I have cycle PLC power after download the ladder. I hope this information will help. Any idea to solve this problem? Thank you. James

Share this post


Link to post
Share on other sites
changing counter preset ranges was explained above. but just having different preset value (as long as it's inside valid range) will not cause configuration fault. if the value is invalid, it will be rejected right away and the loading of parameters will stop at that block. you may have to contact tech support. btw. did you read the manual and understand values in your parameter list?

Share this post


Link to post
Share on other sites
Thank you for reply. I change counter parameter preset value It works with no parameter fault. I try to turn encoder and the reading is 2000 pulse and back to zero. For length measurement, the pulse reading should be accumulate and need to reset manually. How to solve this problem? and how to reset the counter reading? Thanks again for help. James

Share this post


Link to post
Share on other sites
Did you try something like this 1, 101, 8, 0,0,0,0,0,0,0 ; Setup 2 counters blah blah blah 302, 1c,0,1c,0,0,0,0,0,0 ; Configure Gates 4, DFC3,FDA1,20C4,25E,0,0,0,0,0; Setup range for counter 0 (-8388607...8388606) 104, DFC3,FDA1,20C4,25E,0,0,0,0,0; Setup range for counter 1 (-8388607...8388606) <-----<<< 8, FC18,0,3e7,3e7,0,0,0,0,0 ; Setup rate for counter 0 (-1000000...999999) 108, FC18,0,3e7,3e7,0,0,0,0,0; Setup rate for counter 1 (-1000000...999999) 80,8001,8001,0,0,FF00,0FFF,0,0,0; Enable both counters and reset should be: for counter0 O:n/17 (O:n.1/1) for counter1 O:n/33 (O:n.2/1).

Share this post


Link to post
Share on other sites
Guys, this was a very helpful thread. I had to install one of these things at a customer site yesterday, and the help here was much clearer than that horrible manual. Thanks !

Share this post


Link to post
Share on other sites
congratulation

Share this post


Link to post
Share on other sites
Thank you guys, I just configure one, and I did it just reading yours comments.

Share this post


Link to post
Share on other sites
you are welcome. btw. did you register just to post this

Share this post


Link to post
Share on other sites
I have used the HSCE in the past but with a high failure rate. Switched to a MicroLogix 1400 using the first couple of inputs and it has been much more reliable and easier to configure. That is if there is a choice of platforms.

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