News:

  • April 25, 2024, 08:48:14 PM

Login with username, password and session length

Author Topic: Output question  (Read 9949 times)

MichaelL65

  • Jr. Member
  • **
  • Posts: 19
Output question
« on: March 31, 2007, 10:47:11 PM »
I have a H2-CTRIO that I've set up to receive quad encoder input, and I need to start a process when it reaches a certain count. It would appear that I can set up an output to toggle, but I want to do this in software. Do I need to wire an output (let's say Y0) on the card to a normal input, or can I just look at that output directly in the PLC code (I don't see a memory location for this)?

(Maybe I can't find the answer because it's late on a Saturday evening)

(and am I really the first to post a question regarding the CTRIO cards?)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5987
  • Yes Pinky, Do-more will control the world!
Re: Output question
« Reply #1 on: March 31, 2007, 11:06:16 PM »
Well...it depends...

The primary advantage that the CTRIO provides is that it runs much faster than the PLC scan and can trigger your event independently of the PLC, with a much shorter latency. If you don't need that capability, just check the quad counter's value and trigger your event that way. Looping an output back doesn't provide any real value, and a simple relational contact is very easy to implement. Just read the accumulator and compare to your target value. This might be complicated slightly by the fact that CTRIO counters are 32 bit, and relational contacts are only 16 bit, but you can work around that pretty easily.

And yes, you are the first to ask a CTRIO question....but the forum has only been up a couple of weeks.




"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MichaelL65

  • Jr. Member
  • **
  • Posts: 19
Re: Output question
« Reply #2 on: March 31, 2007, 11:58:06 PM »
Hmm, Not the answer I was hoping for.  :-[

I know the card can trigger things faster than the PLC, but for my application I have a high speed encoder that I need it to trigger a series of PLC processes. I am also needing a second encoder to trigger other events, but at multiple points in it's cycle. I was planning to do a table for that and just watch its output location. Guess a series of ">" rungs will have to do that.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5987
  • Yes Pinky, Do-more will control the world!
Re: Output question
« Reply #3 on: April 01, 2007, 12:38:53 PM »
Bummer. Well, let me try again...maybe you'll like this one better. ;)

You can access the CTRIO's output state in PLC memory. When you do your memory mapping, look at the "System Functions" page. I think you will find what you are looking for there. There are two bits for each output, a state bit and a mode bit. For preset outputs, the state bit is what you are looking for.

Hopefully this answer is better...otherwise I'll have to start making things up. ;D
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MichaelL65

  • Jr. Member
  • **
  • Posts: 19
Re: Output question
« Reply #4 on: April 01, 2007, 04:41:22 PM »
Would that possibly be listed in the manual (and program) as 'Out x Active' (V-offset 25.8/10/12/14) as opposed to 'state?' Since there was no description of these bits, I had interpreted 'active' as meaning the output was in use (i.e. assigned a function, not necessarily 'on').

Most of my PLC experience has been with the Toshiba series, so I'm still sorting out a lot of terminology differences...
 

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5987
  • Yes Pinky, Do-more will control the world!
Re: Output question
« Reply #5 on: April 01, 2007, 08:39:11 PM »
Yeah, my bad...it is "Active" and not "State".

We use "active" because those bits are used to describe the behavior of pulse and discrete outputs. For pulse outputs, active means pulsing. For discrete outputs, active means on. The mode bit simply tells whether it is a pulse or discrete output.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

MichaelL65

  • Jr. Member
  • **
  • Posts: 19
Re: Output question
« Reply #6 on: April 02, 2007, 09:36:08 AM »
Thanks! That was holding up the PLC end a bit. Now if the rest of the system will cooperate...