News:

  • September 29, 2023, 03:26:05 PM

Login with username, password and session length

Author Topic: Preset table, no output?  (Read 9407 times)

ERokc

  • Hero Member
  • *****
  • Posts: 118
Preset table, no output?
« on: August 18, 2013, 03:53:19 PM »
Do-more and H2-CTRIO2, two problems.

1. When entering preset values in SCALE mode negative numbers will change after entering to what looks like the raw value.  Didn't take time to do the conversion.  If I select unscaled the values change to very large negative numbers.  Don't know if that a display error or entry error.  Positive values enter and display correctly.

2. I can't get the table to output.  My runs at this point are with negative values moving toward zero so that may be related but tell be if I'm doing it right so far.

Entered values in table with 10ms pulse.
CTTBLLD selected table to $CTRIO_000_Out0
$CTRIO_000.Out0Type is OFF
I set $CTRIO_000.Out0DiscEnabled ON but I'm not using the physical output, just $CTRIO_000.Out0DiscOn to INC a pointer.  I see no output in Trend.

When I SET $CTRIO_000_Out0.EnableOutput the PLC had ERROR "User does not have privileges" and Designer stopped executing on writing to PLC.  Removed above and back to normal.

What enables to preset output?  I've run out of things to try.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5922
  • Yes Pinky, Do-more will control the world!
Re: Preset table, no output?
« Reply #1 on: August 19, 2013, 03:16:29 PM »
1. When entering preset values in SCALE mode negative numbers will change after entering to what looks like the raw value.  Didn't take time to do the conversion.  If I select unscaled the values change to very large negative numbers.  Don't know if that a display error or entry error.  Positive values enter and display correctly.

Presets are all handled internally as raw, as is encoder position. We provide some help getting from scaled back to raw, but raw is correct.

2. I can't get the table to output.  My runs at this point are with negative values moving toward zero so that may be related but tell be if I'm doing it right so far.

Entered values in table with 10ms pulse.
CTTBLLD selected table to $CTRIO_000_Out0
$CTRIO_000.Out0Type is OFF
I set $CTRIO_000.Out0DiscEnabled ON but I'm not using the physical output, just $CTRIO_000.Out0DiscOn to INC a pointer.  I see no output in Trend.

When I SET $CTRIO_000_Out0.EnableOutput the PLC had ERROR "User does not have privileges" and Designer stopped executing on writing to PLC.  Removed above and back to normal.

What enables to preset output?  I've run out of things to try.


Once loading the table, set .EnableOutput. One other thing, the input channel needs to see a reset after the table is loaded.

It sounds like you have multiple things going on, and the privilege error is probably just a comm error showing up as other failures. My guess is that when you turned on the enable, your scan time jumped way up causing the comm error.
"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

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Preset table, no output?
« Reply #2 on: August 19, 2013, 03:27:21 PM »
I'll follow your sequence to get it going.
How about the incorrect values in the table?  Try entering negative numbers to see what happens.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5922
  • Yes Pinky, Do-more will control the world!
Re: Preset table, no output?
« Reply #3 on: August 19, 2013, 03:30:34 PM »
I'll follow your sequence to get it going.
How about the incorrect values in the table?  Try entering negative numbers to see what happens.

The values in the table are raw. If you specified a scale when you entered them, we used the specified scale to un-scale back to raw.
"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

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Preset table, no output?
« Reply #4 on: August 19, 2013, 03:50:53 PM »
You're not understanding what I'm saying.
Positive numbers display correctly scaled and unscaled as entered.
Negative numbers do not.  The entered number changes from what is entered and the unscaled value is about 10 times what it should be.

Try entering a negative number into a preset table.  If you need my values I can make a chart for a few of them. Let me know.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5922
  • Yes Pinky, Do-more will control the world!
Re: Preset table, no output?
« Reply #5 on: August 19, 2013, 05:14:13 PM »
It does appear that the unscale has some issues, particularly with negative values. I'll look into it.

It doesn't change the table itself, however. Entering the values raw should get you where you need to be.
"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

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Preset table, no output?
« Reply #6 on: August 19, 2013, 06:21:52 PM »
Here is what I discovered.
Entering positive numbers scaled or unscaled works.
Entering negative unscaled works, scaled does not.
Unscaled value -20012 becomes +2642432 if scaled is selected after entry. Do not pick OK with "scaled" selected else that entry gets corrupted.

This works as a workaround.  I only have four negative values to enter so not a problem.
The problem is in scale converting negative entries.

Also the "Edit Preset Table" window is not wide enough to show possible entry combinations, ie. "Pulse OFF for 65535 ms at -2147483648".  Probably never have that long an entry but needs to be wider.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5922
  • Yes Pinky, Do-more will control the world!
Re: Preset table, no output?
« Reply #7 on: August 19, 2013, 06:27:59 PM »
It's fixed and will be in 1.1, *very* soon.

There were actually two different classes of problem, both related to negative values.

This particular problem has been in CtrioWB (and by extension DmD) since the CTRIO was released well over a decade ago. Obviously not too many folks using negative preset values...
"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

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Preset table, no output?
« Reply #8 on: August 19, 2013, 07:35:54 PM »
I am usually the odd man to make use of anything.  Not claiming to be gifted but I do find more than my share of bugs.  I am definitely unconventional! In my project I picked the reference point as the edge of the product to be assembled so all the counter values match the drawings hence moving parts up to the index point to start assembly causes things to happen BEFORE the index (negative values).  That makes my preset table match the assembly dimensions.

Before I apply your suggested .EnableOutput and resetting the channel after table load,  I suppose you mean C1F1.Reset? I need to preset the counter before starting the move and I have CTREGWR writing to 0-Ch1Fn1Accumulator.  Reset would clear that register? Do I need to reset then write the register?

What's the proper sequence and am I on the right track?

Thanks for your help again.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5922
  • Yes Pinky, Do-more will control the world!
Re: Preset table, no output?
« Reply #9 on: August 19, 2013, 09:37:41 PM »
Before I apply your suggested .EnableOutput and resetting the channel after table load,  I suppose you mean C1F1.Reset? I need to preset the counter before starting the move and I have CTREGWR writing to 0-Ch1Fn1Accumulator.  Reset would clear that register? Do I need to reset then write the register?

Reset means anything that resets the channel: .Reset, a reset input, or a reset preset entry...although the table entry wouldn't be relevant in this case.

Reset sets the accumulator to the specified reset value. If that value is always a particular value, just set the reset value in the config and you won't need to set it again.

What's the proper sequence and am I on the right track?

The key point is that the channel needs to see reset after the table is loaded. Set the .Reset bit, load the table, then drop the bit. If you also have set the channel's reset value to the proper initial value, you should be done at that point. Were I doing this, I would probably throw the whole concoction into a program block and fire it off any time I needed to load a table.
"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

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Preset table, no output?
« Reply #10 on: August 19, 2013, 10:18:24 PM »
Output still not working. :(

My "CTREGWR writing to 0-Ch1Fn1Accumulator" got over written (.reset) even though I had the .reset release on the rung before CTREGWR.  Could be me misunderstanding execution sequence of ladders.  I found examples on the CTTBLLD HELP page.  I will study them.  One status not correct is $CTRIO_000.Out0Type = OFF. says  ON if CTRIO output x is configured for pulse output. It's not getting turned on.  Will try again tomorrow.


This might be better than setting accumulator if it works, please advise.
My reset value will change so can I "CTREGWR write to 8-Ch1Fn1 Reset Value"  then set & release reset?  Is that value raw?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5922
  • Yes Pinky, Do-more will control the world!
Re: Preset table, no output?
« Reply #11 on: August 19, 2013, 10:41:41 PM »
My "CTREGWR writing to 0-Ch1Fn1Accumulator" got over written (.reset) even though I had the .reset release on the rung before CTREGWR.

The PLC is operating asynchronously from the CTRIO. Where in the scan something happens isn't terribly relevant since all interaction with the CTRIO occurs at the bottom of the scan. Again...please consider putting the setup in a program block and use stages to sequence through the steps. That will ensure that stuff happens in the right order and works every time.

One status not correct is $CTRIO_000.Out0Type = OFF. says  ON if CTRIO output x is configured for pulse output. It's not getting turned on.  Will try again tomorrow.

The .Out#Type fields are set by the module based on the configuration and serve no purpose other than to tell the status displays in DmD and CtrioWB whether to treat the output state as either the actual state of a discrete output or the active/inactive state of a pulse output. It really isn't there for user purposes and isn't telling you anything you didn't already know...since you are the one that configured to be either pulse or discrete when you set up the module. Incidentally it has nothing to do with whether a discrete is 'pulsed' on, it is referring to whether the output is configured as 'pulse' or 'discrete'.

This might be better than setting accumulator if it works, please advise.
My reset value will change so can I "CTREGWR write to 8-Ch1Fn1 Reset Value"  then set & release reset?  Is that value raw?

Either way works, you just have to be cognizant of order. If resetting, the set accumulator function must occur after the reset, or, the set reset value must occur before. It might be cleanest to use the set reset value, then load the table, then bump reset. Again...use stage.

Both set accumulator and set reset use raw values. Pretty much everything internally is raw.
"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

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Preset table, no output?
« Reply #12 on: August 20, 2013, 07:17:32 PM »
I'm still not getting an .Out0DiscOn
.reset hi, load table, .reset low, .Out0DiscEnable. 
I see the above switch in Trend as it runs to position.  I extended the position so it would run into positive counts.
NO output.  What do I need to look for?

Three hours later, I inadvertently removed the SET .Reset.  I have .Out0DiscOn for the first time.
I think the table is NOT loading while .Reset is high.

I noticed the preset negative numbers get corrupted when opening the Edit Preset Table window. I see Designer 1.1.1 listed on the Host home page.  When will it be downloadable?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5922
  • Yes Pinky, Do-more will control the world!
Re: Preset table, no output?
« Reply #13 on: August 20, 2013, 09:47:00 PM »
I'm sorry, I guess I misled you. Truthfully, I shouldn't really be supporting CTRIO...been too long. I probably should be letting the real support guys do this. ::)

Yes, I'd say it is the rising edge of the reset that is resetting the table index pointer. The table is definitely still loading, but until the index gets reset, the table won't do anything.

The issue with negative numbers is the same problem as the previous one you reported. It is fixed in 1.1, which was released today. If you will close and re-open Designer, and make sure that you PC is connected to the Internet, you should get a prompt to download the update. You can also go to the Help menu and select Check for Updates.
"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

ERokc

  • Hero Member
  • *****
  • Posts: 118
Re: Preset table, no output?
« Reply #14 on: August 21, 2013, 10:16:12 PM »
After each run the counter will have to be reset as it is a conveyor that the encoder is counting. The conveyor doesn't reverse back to home, it continues to the push bar on the second section of the chain which is a short move forward.  The encoder counter gets reset on the sensor edge for each section.

I am writing to the counter accumulator after loading the table.  Would that reset the table?  What ever I'm doing it's working w/o .reset  On to the next step of the process.

As for Designer 1.1.1  Someone needs to change the download link from 1.0.2 that follows the home page link.
http://ftp.automationdirect.com/pub/domore_v102.zip  I got the download from the Forum post but have not installed it yet.