HSCE2 how to

jshbnd

Member
Join Date
Jul 2019
Location
california
Posts
3
I recently had to set up this module and would like to share what I learned, as this was a difficult process for me.

The HSCE2 high speed counter card needs to be set up every time the power cycles on the plc or when it exits and re-enters run mode. (initialization)
The way this is done is by writing integer source files to the same 8 word output file.
The 8 word output file you are writing to starts at the first output address of the card you are installing. so for example if your card is installed in slot 3 of the plc then the first address is O:3.0
The way the card differentiates what block you are writing to is by a single bit in the first word of that 8 word block.
For example: If you are writing to the module setup block, then bit 0, of word 0 will be true in the source file. If you are writing to the counter configuration block then bit 1 of word 0 will be true in the source file, etc.

Unfortunately I had to read the documentation for this counter over and over before I was prepared to write the ladder logic.
As you are reading the documentation you should be asking the following questions and taking notes;

  1. what class am I operating in?
  2. what operating mode?
  3. what should my input configuration be?
  4. what is my gate preset mode?
  5. what type of counter will I use? (linear or ring)
  6. will I be using outputs, ranges, etc. and how?
  7. what are my min/max values for counts and ranges?

If you need a count that will be greater than 32767 than be sure you are using class 4 operation. the card doesn't use a reset, it uses a preset. So if you want to reset the card to zero count you need to make sure that your preset is zero. then you will use whatever type of preset that you want to reset the card.

I made a pin chart for every configuration block that I would be using. Not everyone uses all of the blocks.
I then wrote the data source files that I would be using to store those pin chart values in for transfer to the card.
I then followed one of the ladder logic examples for writing my initialization program into my sequence, with some modifications. I didn't use the integer value increment method to point to the source file. I simply used a counter that incremented on the ack bit and equ instructions to move the files.
think of this as almost like an SQO where you are going to be drawing from multiple pre-filled source files to write to one output file, except that the destination is actually a physical output address, which is unusual. I reset the counter in the first rung of initialization where the example would have you reset the value to zero in the pointer file.
I also didn't use a JSR instruction after the first rung. I simply used a bolean OTE which is true if not first pass, if not error, if not initialization complete. then I used XIC versions of that same bolean to allow the later rungs to go true.
The basic premise is that the first pass is you filling the output file with zeros which turns off the counters. Many of the blocks will error if you try to write to them when the counters are on. You are also resetting the error bit if latched, and the initialization bit if latched. You will also reset whatever pointer method you will be using.
after this work is done, you will use a JSR or a bolean like I did to allow the logic to start writing the source files to the output file one at a time.
remember that the output file uses one bit in word 0 to resolve which block you are trying to write to.
after each block is written, the card will either make the ack bit true or the error bit true. If the information is written correctly the ack bit will be true and not the error bit.
The ack bit is then used to increment the pointer so that you can write the next source file to the output file.
When you have written all the files you need for your application, you will set the initialization done bit and write the counter control block. This is where you will turn your counters on (EN bits)
From here on out during operation, typically you can use individual bits to reset, enable/disable, etc.

If you get an error during initialization, I suggest removing one by one a line that writes to a specific block until you can figure out which block is giving you the error (PERR bit). then review the documentation and your source files.
Note: Whether or not you are using the outputs or ranges please be sure to make the PRA bit for the module setup block true. I can't explain it, but trust me. (word 1, bit 8)

I hope this will help you out, as I have often turned to this forum in my hour of need. I would like to give back to the community for a change. Please help me correct any bad information, and good luck.
 

Similar Topics

Hi all I need your help, I have a 1746-HSCE2 card configured, the pulses read perfectly, but I have a problem as I use the pulse counters in...
Replies
8
Views
2,162
Hi everyone. It's been a long time since I have asked for your help but I have been given a heap of plcs cards that have been changed out that...
Replies
0
Views
1,199
I'm setting up the HSCE2 and just about have most everything coded and ready for testing. As anyone familiar with this card may know, the manual...
Replies
0
Views
1,364
We have a fault with the existing HSCE card. I need to replace it with a new HSCE2 card. The processor is SLC5/03 Could some one please help me...
Replies
1
Views
1,430
Hi there ! I'm desperate for help. I'm trying to configure an SLC 5/03 with a HSCE2 module. I've tried to read the horrible AB manual , but I cant...
Replies
1
Views
1,640
Back
Top Bottom