I need a PLC to generate pulses.

Join Date
Apr 2002
Location
No income tax, no capital gains tax. Freedom!
Posts
8,389
I need a PLC that can generate 2500 square waves per second. We have a Compact Logix with a 1769-HSC card. I can generate 2500 pulses per second with the 1769-HSC card but that is on a good day with the under the right conditions. This is nuts. The card can take 1Mhz in but can only generate 2500Hz out on a good day. Part of the problem is that the output is not a differential signal.

The goal is to read an encoder, do my magic filtering and then output pulses that a jitter and noise free. This will also let me generate more counts than what the input encoder is making. How is that for something new?

Here are my options. I can modify one of our products. This requires one of our FPGA engineers to modify an FPGA. Our product can easily generate pulses into the MHZ. However, this option is not cheap time wise or hardware wise to do only once.

It would be cheaper to have another device or PLC that just does the encoder filtering rather than modify one of our products. I am looking at stand alone DSP cards too but they would be a kludge.
 
If you can live with S7, the 2PULSE technological module on ET200S is worth a look at. (although again the outputs aren't differential and it's flat out at 2.5kHz) ...inexpensive solution if you could use it though.
 
So, Peter, you need how much data to be read, modified, and reproduced every 0.0004 seconds?

Why a PLC?

Why not specify a servo amplifier with a "repeater" circuit built in? (do they still make those?!?!) But then that wouldn't ler you massage the signals.

Quadrature encoder signals in and out or a single PTO?

I have worked with some digital servo amplifiers that had this capability, but no PLC. It was all hardware based, with analog filtering, and scaling and that's it. They did not provide the ability to program any logic in between the input encoder and the "pseudo encoder" or "encoder equivalent" output signals to the motion controller, but there was little if any lag time, and it was extremely repeatable. The amp closed the torque or velocity loop, and the motion controller closed the position loop.

We used the BDS4 by Kollmorgen (resolver servo), that had an inexpensive, itty-bitty, plug-in option card for this. Also, old AB analog and digital amps had this, and the digital (1391-?DS?) would let you choose from among standard PPR for the output square wave... can't remember the highest resolution ...


Yep, I could be wrong, but this may best be done with hardware or a single module. And, with minimal processing steps between the input signals and output signals.


...


Unless there's some multiple channel PTO card with a 400usec communication rate to a PLC that I haven't read about.

I can't get to Mitsubishi or Siemens sites from here to check out the aforementioned PLCs...maybe Tuesday from work...

Paul

EDIT: Wow, the FPGA sounds like just the ticket! Now that's an ingenious bit of hardware.

L D[AR2 said:
Another possibility is the Siemens FM352-5 high speed boolean processor (1 microsecond "scan time")

http://support.automation.siemens.com/WW/llisapi.dll/csfetch/9240171/fm352-5_e.pdf?func=cslib.csFetch&nodeid=9237692&forcedownload=true
 
Last edited:
Peter Nachtwey said:
I need a PLC that can generate 2500 square waves per second. We have a Compact Logix with a 1769-HSC card. I can generate 2500 pulses per second with the 1769-HSC card but that is on a good day with the under the right conditions. This is nuts. The card can take 1Mhz in but can only generate 2500Hz out on a good day.

I am wondering if because the 1769-HSC needs to communicate over the inter connecting back plane connecting cable, to the processor, that this may be causing a bottle neck in comms, that might be remedied by using a brick MicroLogix 1100 or the about to be released 1400 as the specs show 40khz in and out for the 1100, and 100khz in 40 khz out for the 1400.

As Okie said, " modified, and reproduced every 0.0004 seconds? "

Thats very fast scan time, so any PLC could find this a challenge.
 
Gil47 said:
I am wondering if because the 1769-HSC needs to communicate over the inter connecting back plane connecting cable, to the processor, that this may be causing a bottle neck in comms, that might be remedied by using a brick MicroLogix 1100 or the about to be released 1400 as the specs show 40khz in and out for the 1100, and 100khz in 40 khz out for the 1400.

As Okie said, " modified, and reproduced every 0.0004 seconds? "

Thats very fast scan time, so any PLC could find this a challenge.
As LD has already mentioned Siemens, why not take it a step further?
VIPA makes the STEP7 series CPU, they claim to be blinding fast in the very low microSecond ranges!
Way faster according to them than even the Siemens Technology CPUs.
Worth looking into it.
Plus, you can use Siemens Step7 to program those beasts.
I haven't touched one, just throwing out ideas.
 
As long as we are mentionning the FM352-5, here is a description of one of the integrated library functions it supports:





Programming and Operating the FM 352-5 p.​
6-73



FM 352-5 High-Speed Boolean Processor:​


Clock Pulse Generator (CP_Gen)





The Clock Pulse Generator (FB119) allows you to output a pulse at a specified frequency from less than 1 Hz to a maximum of 50 kHz.​
When the signal state at the input ENABLE is 1, a clock pulse is generated at the output Q, as shown in Figure 6-46. The output frequency is determined by inverting the value of the word input (PERIOD), which is an unsigned integer represented as a hex value, multiplied by 20 microseconds.​


The frequency is equal to 50,000/​
PERIOD.


The PERIOD is equal to 50,000 divided by the desired frequency. For example:​



•​
When PERIOD = W#16#C350, a frequency of 1 Hz is output.

When PERIOD = W#16#1, a frequency of 50 kHz is output.

Hope this helps,
Daniel Chartier
 
Last edited:
=L D[AR2,P#0.0]]
I have never looked at a FM352-5 before. It looks like something we would make. I will suggest this. My FPGA designer will go nuts and say he wants to do the same thing only better since our FPGA run 240 times faster than FM352-5**. It would be used in stand alone mod since all we need is encoder pulses in and 'perfect' encoder pulses out. This doesn't look cheap though.

I have Step7 ver 5.3. I don't know about how I would program the micro memory cards unless that is done using a slot on the S7 itself. This question arises from section 9.1.

Gil47 said:
The PLC would NOT need to get involved after set up. This needs to be done in a FGPA like the FM 352-5 does. As I said in the first post, we would modify FPGA code in our motion controller.

I have a feeling it will come to this. We will debate the options we have. A FM352-2 can only be used if I program it. The FPGA designer will want to do it himself and better.
However, we don't have time for that now. We need something that we can start quickly and is a documented product.

** Actually, I think the FM 352-5 FPGA must run much faster than 1 microsecond scans. I think the FPGA actually interrpets the code in the MMC. That is why it is slower. FPGAs don't really have scans. They are able to execute the FPGA in parallel and just need a clock to synchronize the inputs to the internal state and to the outputs.

One more thing. The list of avaiable functions doesn't list the registers that are available. Are they the same as the S7?
 
chrome is a little weird in these textboxes...i think i got it fingered out now...

Peter Nachtwey said:
I have never looked at a FM352-5 before. It looks like something we would make. I will suggest this. My FPGA designer will go nuts and say he wants to do the same thing only better since our FPGA run 240 times faster than FM352-5**.

Peter Nachtwey said:
The FPGA designer will want to do it himself and better. However, we don't have time for that now. We need something that we can start quickly and is a documented product.

So what. Call him in your office and tell him you have a very important project for him, and give him the FPGA documentation and tell him how important it is that we "top this" before it's too late.

While he's busy saving the company, you write your magic into the existing siems FPGA in standalone controlelr mode, and use the OEM lock tools while you are at it (if available). Using the Siemens module with their interface (or have another capable engineer that you trust, assist you with the conversion) you will no doubt find a way to get it done, and pick out all the flaws in their interface design in the process. (future software marketing research...)

Peter Nachtwey said:
It would be used in stand alone mode since all we need is encoder pulses in and 'perfect' encoder pulses out. This doesn't look cheap though.

Yabbits? You are the president. "Yeah but it's expensive"....
---
It is a test bench for your magic, how much is that worth?
---

I, for one, have confidence in your magic, and we ain't even met yet!

Peter Nachtwey said:
I have Step7 ver 5.3. I don't know about how I would program the micro memory cards unless that is done using a slot on the S7 itself. This question arises from section 9.1.
....I have a feeling it will come to this. We will debate the options we have. A FM352-2 can only be used if I program it.

That sounds like a technical yes, and another stray yabbit.

Peter Nachtwey said:
** Actually, I think the FM 352-5 FPGA must run much faster than 1 microsecond scans. I think the FPGA actually interrpets the code in the MMC. That is why it is slower. FPGAs don't really have scans. They are able to execute the FPGA in parallel and just need a clock to synchronize the inputs to the internal state and to the outputs.

---

One more thing. The list of avaiable functions doesn't list the registers that are available. Are they the same as the S7?

See, now you've already figured out how to make it better.

I did not read the chapter on the Siemens interpreter or configurator, but I would think you should be able to connect your logic and alter it if needed, but have the freedom to set it up and put it in run mode, only depending on the total number of steps from inputs to outputs and a clock cycle to calculate the throughput of your magic. It should be extremely fast, and regular, depending on how compact the algorithms can be made.

If the magic is a finished piece, or even if it's not, a test bench will figure that out for you, as long as it works, even if it takes 39 microseconds, its still a step forward...am I way off?

Paul
 
Last edited:
You are under a great misconception

You think that just because I have the title 'president' that I am actually in charge or can control engineers. Wrong.

I would do it this way. I would get a development kit with this chip on board.
http://www.rabbit.com/products/rio/
My first computer was a Z80 with cassette tape for storage. The rabbit is basically a much enhanced z80. Programming the rabbit is with my skill set. The rabbit could do the filtering updates more than fast enough. If I use the Rabbit Semiconductor's Dynamic C then it will take me about 20 lines of code to do what I need to do. We shall see tomorrow.

I wonder why someone hasn't built a better FM 352-5 for the Rockwell PLCs........ yet. I think it would be fun but I don't know if it would make any money. I would have a library of DSP like routines that can be called by the user program. It appears the FM 352-5 makes you write these from scratch. I thought about this while taking my walk today. It would be hard to beat the 1 microsecond scan time that Siemens claims even now with much faster FPGAs and very fast DSPs. I wonder if the is a misprint or just how long it takes to execute one instruction.

I will have an interesting discussion with the hardware engineers tomorrow.

See, now you've already figured out how to make it better.
Not sure but it has me thinking. How can we do better? If we can do better can it pass Delta rule or guide #3? "Just because you can doesn't mean you should". The idea of making something like a FM 352-5 has be raised before in a serious way almost 8 years ago. It failed to get past Delta rule #3. We decided not to spread ourselves any thinner.
 
Peter Nachtwey said:
I wonder if the is a misprint or just how long it takes to execute one instruction.

It wouldn't be the time for one instruction. Even an off-the-shelf S7 CPU has instruction execution times of 50 nanoseconds now.

I haven't used the 352 for a few years, but based on your prior experinces with S7, it will probably be the most unfriendly card to set up and use that you've ever seen. It's too bad, because it really is quite a unit. I have another application coming up where I might need a few, and I am finally going to sit down and write my own parameterization logic and throw out the canned Siemens functions.
 
FM352 is very flexible product, but is very complex to actually impliment in the real world. I have only used it once before, once it was installed and commissioned it worked well but getting there was painful.

Prior to S7 there was a IP265 module for the 100U range which was a similar beast, not quite as capable, but seemed easier to work with.

Another option may be to use S7-200, it has High speed input and high speed outputs, used the high speed inputs in the past but never used the high speed output so I dont know if it will do what you want.

If you geta 2 port version 2nd port can talk Modbus, or you can add a DP slave module, or an Ethernet module.
 

Similar Topics

Hi all Trying to remotely connect to a TIA Portal PLC. I can ping it without a problem but can't get my software to connect. I've opened port...
Replies
8
Views
326
See code at the bottom. Hi all. For the story, this is my first complete project using a Rockwell PLC, I've been mostly working with Unity Pro...
Replies
7
Views
792
I want to buy used/inexpensive (under $500) PLC hardware and software for personal use/testing. Can any of you suggest the best way to go about...
Replies
46
Views
4,801
I'm currently working on a PLC setup and could use some advice on the best way to manage my power supply units (PSUs). Here's the configuration...
Replies
3
Views
407
Hi guys, I have no experience when working with AllenBradley PLC, but I hope someone could clarify the result of multiplication shown in the...
Replies
14
Views
2,194
Back
Top Bottom