Host Engineering Forum

General Category => CTRIO and CTRIO2 => Topic started by: ERokc on August 18, 2013, 03:53:19 PM

Title: Preset table, no output?
Post by: ERokc 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.
Title: Re: Preset table, no output?
Post by: BobO 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.
Title: Re: Preset table, no output?
Post by: ERokc 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.
Title: Re: Preset table, no output?
Post by: BobO 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.
Title: Re: Preset table, no output?
Post by: ERokc 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.
Title: Re: Preset table, no output?
Post by: BobO 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.
Title: Re: Preset table, no output?
Post by: ERokc 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.
Title: Re: Preset table, no output?
Post by: BobO 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...
Title: Re: Preset table, no output?
Post by: ERokc 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.
Title: Re: Preset table, no output?
Post by: BobO 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.
Title: Re: Preset table, no output?
Post by: ERokc 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?
Title: Re: Preset table, no output?
Post by: BobO 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.
Title: Re: Preset table, no output?
Post by: ERokc 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?
Title: Re: Preset table, no output?
Post by: BobO 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.
Title: Re: Preset table, no output?
Post by: ERokc 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.
Title: Re: Preset table, no output?
Post by: franji1 on August 21, 2013, 11:23:34 PM
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.
You may have cached pages?  From Host's Home page I clicked on the Designer link in the right frame, and Do-more link below the Software node in the left frame, and they both went to the Designer page on Host's site that had links that take you to ADC's Designer download page.  Is there another link that I missed?
Title: Re: Preset table, no output?
Post by: BobO on August 22, 2013, 02:12:13 AM
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.

You said the encoder counter was being reset by a sensor. That's still a reset and is likely why it is working.

We have no control of ADC's website, although they did update their download link earlier today. You really don't need a link though, the update is automatic through DmD.
Title: Re: Preset table, no output?
Post by: ERokc on August 23, 2013, 04:48:47 PM
"Do-More Designer can be downloaded at no charge or a CD copy can be purchased from Automationdirect by ordering this item for a nominal charge. "

Above is the line above the Do-more Designer Revision History. "downloaded at no charge" is the link to 1.0.2  I have my copy but someone new would not get 1.1.1 from this link.

This can't be a Cached page as 1.1.1  is new to the page.
Title: Re: Preset table, no output?
Post by: Controls Guy on August 23, 2013, 06:53:54 PM
Without trying to replicate where I got the software or where you got it, I just opened the ADC main page trying to emulate what someone would do who didn't know where it was supposed to be.

I clicked on Downloads / Software, then on that page, clicked on the Do-More link, which took me to:

http://support.automationdirect.com/products/domore.html

The main "Download File" link at the top about v1.1.1 links to http://ftp.automationdirect.com/pub/domore_v111.zip

The bottom one, claiming to be for v1.0.2, links to http://ftp.automationdirect.com/pub/domore_v102.zip

This is also the page you get to if you drill down into the online catalog for Do-More stuff and click the link for a free download of the software.  So at least that particular page seems to be working, and may be the one people will find while searching for the software.  
Title: Re: Preset table, no output?
Post by: BobO on August 23, 2013, 09:07:08 PM
The 'download at no charge' link is to ADC's site. That particular page was updated middle of the day on Wednesday. If it is not working, I'm not sure what else to do, because it does appear to be correct.

If I am still not understanding what you are telling me, I am sorry...sometimes I'm slow. ::)
Title: Re: Preset table, no output?
Post by: Controls Guy on August 23, 2013, 11:34:07 PM
Agreed, BobO.  Your "download at no charge" link is to the first page I mentioned in my post.

Everything looks right to me too.