Help with Circuit..New at this

papagyo

Member
Join Date
Sep 2002
Posts
10
My question is this: I would like to know if this is possible with a PLC or not. (all signals are coming from a PCB board on a machine.."linear accelerator") I have 6 inputs #1 is a counter sending a pulse signal, #2 is a signal called HVON, #3 to #6 are BCD inputs. What I want to do is this: When the signal on HVON is activated the counter of the machine starts and at the same time signals are sent to the BCD inputs which will then be decoded (as in 4 to 16 decoder) and a certain "energy" (one of eight possible) will be selected and the counter will send this output count and accumulate the count as long as it is running. Works like this..say I am running the machine and select energy of 6Mv and set it for 300Mu's (monitor units) I hit the start button of the machine and away it goes I want to be able to record those 300 Mu's into a memory location..next time I run the machine I again select 6Mv for 100 Mu's and start it..I want this 100 added to the previous and stored and so-on and so-on for any energy level and time I select. Can this be done and how simple or hard will it be..keeping in mind that I am very new to PLC programming. Oh yeah I will be using Automationdirect D0-06 PLC

I have attached a circuit diagram that shows what I need to do.

Thanks very much.

circuit.jpg
 
Implementing the logic should not present any problems other than deciding on which approach of the dozens of possibilities to take.

Your real concerns will be the frequency and duty cycle of the pulse input and how reliably you can detect each pulse given the filter time constants on the PLC's inputs and the PLC's program and I/O scan times.
 
Post topic

Gerry..I am wondering if you would be kind enough to enlighten me on at least one of these approaches or steer me in the right direction. Thanks very much in advance.

papagyo
 
Well, we don't like to give away too much too soon around here, but...

The ladder equivalent of the AND gate looks like:

----| |--------| |--------------( )---


I'm not familiar with the Automation Direct instruction set, but it may well include a 'Decode' instruction to do the binary to 1 of 16 operation. If not, then you'll have to 'roll your own'.
 
I think what Gerry's saying is that it would be quite simple to duplicate your circuit in PLC logic. Your first concern here should be how fast your "counter" input is cycling (i.e. frequency). Another thing to consider is how much data you need to accumulate before "offloading" it from the PLC. You can't just stick a bigger hard drive in a PLC you know!... :rolleyes:

If you're still hell-bent on figuring out the logic first, then read up on the BIN instruction in the manual, and investigate the amount of V-memory you have in the 06.

If you're capturing high-speed data, you may find that your "dedicated" circuit may be a better solution than a PLC.

beerchug

-Eric
 
In addition to ladder, some PLCs also use FBD, this will allow Papagyo to implement his logic directly without converting it to ladder.
Of course, the two remaining problems are:
1, does an Automationdirect D0-06 PLC use FBD.
2, scan time.

Doug
 
post Topic

Hey guys I guess what I am looking for is some sort of example on this type of thing...I already knew the equivalent to the and gate. The frequency of the counter is something around 1.7KHz. Thanks very much.


papagyo
 
1.7 Khz is too fast to be reliably monitored by a standard discrete input. You're going to need a high speed counter. According to their advertising, the DL06 has high speed inputs.

High speed inputs generally work by keeping track of the counts in a separate process from the PLC scan, and updating the PLC with the accumulated counts every I/O scan. The bottom line is that you will not have access to every individual off-to-on transition of the count signal in your ladder logic, so your logic won't be a verbatim copy of the hardwired system.

You will still probably be able to do what you want by using the "Greater than or Equal" function in ladder logic.
 
I already knew the equivalent to the and gate.
I suspected as much since it appears you're involved in the non-trivial field of nuclear physics. However, the original post did leave some doubt...

As Steve has said, 1.7 khz is too fast for normal inputs and basic counting. As I said before, I'm not familiar with DL06. Usually, these 'shoe-box' controllers have one or two inputs that can be configured for either basic switch-type inputs or 'high-speed' counting. Even when configured for high speed they still have some input filtering (usually there is a choice of time constant) and therefore pulse width is still a consideration. If there is an upper frequency limit spec for the input, it most likely assumes a 50% duty cycle.

Assuming you can capture all the pulses, perhaps all you need to do is load different multipliers to be applied to the counts.
 
post Topic

Gerry..thanks for the response. Again though I am not getting much to go on here. I have read the manual and several tutorials concerning high speed counting, but keep in mind that I did not even know what a PLC was or ladder programming 4 days ago! Problem is I do not regularly do programming of this sort (or any kind) this just got dumped on me. I am looking for examples that I can use that will guide me through the process of setting this up. thanks


papagyo
 
A direction

I think what the guys are telling you is that being new to this, the best thing for you to do is pick a direction and go with it. They have already told you that you need some kind of processor with high speed inputs. Start checking with vendors, AB, Automation Direct, etc, and pick THE PLC you are going to use. The vendors will suggest the best one for your application. Since you already know your requirements, this shouldn't take too long to do. Once you've gotten your PLC and the proper "goods" that come with it, chances are there will be a really good help file in the Instruction set that will tell you exactly how to set up your ladder. The Compare functions that Steve mentioned might work very well. I am confident that if you get your PLC, read the help file for the instructions set, you will see how they work and what you need to do with them to achieve your desired result. They guys aren't going to give you the whole answer, but they have given you a couple of steps. Take these steps, and come back when you get stuck again. That's my advice.

Russ
 
papagyo,

You're right, there are not a lot of details here. From my personal perspective, it's because I don't know the details of the DL06 high speed counter. In spite of that, here is a possible control strategy.

Your challenge is to transfer the accumulated count from the high speed counter to one of several data storage registers in the PLC. The correct register is determined by the BCD value. As I understand it, you want the values in the internal storage registers to be retentive. Let's call these registers the 'Retained values'.

While the HVON signal is true, the accumulated value for the selected energy level will be the sum of the retained value and the HSC accumulator. When the HVON signal transitions from true to false, you need to transfer the sum of retained value + accumulator value to the retained value register and reset the HSC accumulator to zero.

Be aware that the HSC will have upper and lower count limits. When it reaches the upper limit, it will roll over to the lower limit. I don't know what those limits are. The counter accumulator could be a 16-bit number, it could be 24-bit or 32-bit.
 
Post topic

HI,

As it turns out a very kind soul has given me plenty of help with this small program..I was wondering if anyone would be willing to take a look at it and tell me if it will serve the intended purpose (circuit shown on first post) I am still missing one thing if I could get a tip or two on how to divide the count accumulated in the high speed counter by 100 before it is stored in the various memory locations. Also I would like to ask the correct procedure to add the new count to the previous each time. I have attached the ladder program in a zip file to view and I use DirectSoft32 from automationdirect to make it and D0-06 Hardware. Thanks very much in advance.

papagyo
 
Ut oh, time to upgrade my DirectSOFT... I can't open 06 projects... banghead

Even without seeing the ladder, I can probably point you in the right direction regarding your questions...

You'll need to use the double word version of the instructions, as the HSC is a double word value

Divide x 100:
Code:
[size=3]

     SP1         +-------+
|----] [-----+---| LDD   | [SIZE=2]Load HSC counter value into the accumulator[/SIZE] 
             |   |       |
             |   | CTA76 | ([SIZE=2]or wherever the HSC is in the 06)[/SIZE] 
             |   +-------+
             |
             |   +-------+
             +---| DIVD  |
             |   |       | [SIZE=2]Divide the accumulator value by 100[/SIZE] 
             |   | K100  |
             |   +-------+
             |
             |   +-------+
             +---| OUTD  | 
                 |       | [SIZE=2]Transfer the result into Vxxxx[/SIZE] 
                 | Vxxxx |
                 +-------+
[/size]
Adding to previous count:

Code:
[size=3]

    UPDATE       +-------+
|----] [-----+---| LDD   |  
             |   |       | [SIZE=2]Load "previous count" value into the accumulator[/SIZE]
             |   | Vyyyy |
             |   +-------+
             |
             |   +-------+
             +---| ADDD  |
             |   |       | [SIZE=2]Add the "new" value[/SIZE] 
             |   | Vxxxx |
             |   +-------+
             |
             |   +-------+
             +---| OUTD  |  
                 |       | [SIZE=2]Updated "total count"[/SIZE]  
                 | Vzzzz |  
                 +-------+
[/size]
Modify as needed for you application... :D

beerchug

-Eric
 

Similar Topics

Hello everyone, I'm having trouble selecting the right circuit breakers for the "line side" of my VFD. The common advice is to check the...
Replies
21
Views
1,369
Hey guys, I'm fairly new to PLC and RSLogix5000, as I am currently a student. I am doing a traffic light project, which is only running off of...
Replies
8
Views
1,959
Studying for a Test, Can someone please explain the answer please !! See attachment
Replies
11
Views
2,947
So I have been trying to give myself a crash course is safety circuit design in the last few days. I put together these examples and I wanted to...
Replies
15
Views
8,159
Okay, So I'm designing a motor circuit that will have E-stops running to a AB safety relay. What keeps the Contactor that the safety relay will...
Replies
12
Views
3,821
Back
Top Bottom