IEC Timers

More
09 Jul 2012 11:55 #21713 by LAIR82
IEC Timers was created by LAIR82
I am trying to add more IEC Timers to my classic ladder program and keep getting "unknown parameter numTimerIec=50" in my dmesg file. I am inserting this in the same line in my hal file, loadrt.

Any help would be greatly welcome, as I have only been working with emc and classic ladder for only about a month now and had never even heard of it before that.


Thanks

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 12:27 - 09 Jul 2012 12:28 #21715 by BigJohnT
Replied by BigJohnT on topic Re:IEC Timers
Check to see that the spelling is exactly "numTimersIec" and you have a space between each ladder object you change the configuration of. Perhaps you have a lower case L instead of an upper case i which look similar.
loadrt classicladder_rt numTimersIec=12

I just noticed you lost the "s".

John
Last edit: 09 Jul 2012 12:28 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 13:51 #21718 by LAIR82
Replied by LAIR82 on topic Re:IEC Timers
I was missing the S on timers. worked great. I have another question, I have created a M141 command in the ng_file for spindle low range. How do I make it so I can use it as an input in my classic ladder to actually fire a solenoid. I am able to link that command directly to my solenoid output pin but not to my ladder.

Thanks again.

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 14:49 #21719 by BigJohnT
Replied by BigJohnT on topic Re:IEC Timers
If you open up Machines > Show Hal Configuration and on the Pins tab look for classicladder there you can see the out pins (as well as the rest of the pins) which I assume you want to fire a solenoid.

John

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 15:10 #21720 by LAIR82
Replied by LAIR82 on topic Re:IEC Timers
I have that, I just dont know if i need to create a pin to associate with a classic ladder input. I was just able to use the newsig function to create the new signals needed for the new Mcodes I created, and using the "watch" window in the "show hal configuration" I can see that when i enter M141 in the MDI box and hit enter it toggles the red/yellow indicator. But when I enter that signal name in the postgui.hal file to associate it with a ladder input it sends an error. I dont know if i need to create a new pin to associate with ladder, or if what i am trying to do is just not feasible.

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 15:28 #21721 by BigJohnT
Replied by BigJohnT on topic Re:IEC Timers
So when you do a M141 you want classicladder to know you have done so?

Can you post the relevant lines of code that your attempting to use?

Also if you have not read this short HAL page is might help. In particular look at the signal in out diagram.

John

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 15:47 #21722 by LAIR82
Replied by LAIR82 on topic Re:IEC Timers
Yes, when I enter M141 in MDI, I want ladder to see that as an input, then perform some logic in ladder, then ladder fires the solenoid. Here are the files and code associated with my M141 command.

In my ng file

M141
#!/bin/sh
#low-speed
halcmd sets motion.mspindle-low-speed true
exit 0

In my hal file
newsig motion.mspindle-low-speed

In my postgui file

net M141 classicladder.0.in-26 <===motion.mspindle-low-speed
net low-range-sol classicladder.0.out-24 ===> hm2_5I23.0.7I71.3.output-02

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 16:01 #21723 by BigJohnT
Replied by BigJohnT on topic Re:IEC Timers
Your trying to use a signal as a pin and that is not allowed. newsig is generally not used anymore as it has been replaced with net.

The following should work in your postgui file and should be all you need...

net motion.mspindle-low-speed => classicladder.0.in-26

John

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 16:51 #21724 by andypugh
Replied by andypugh on topic Re:IEC Timers
LAIR82 wrote:

when I enter that signal name in the postgui.hal file to associate it with a ladder input it sends an error

Just as a general observation, telling us the what the error message says makes it much easier to diagnose the problem.

Please Log in or Create an account to join the conversation.

More
09 Jul 2012 19:16 #21726 by LAIR82
Replied by LAIR82 on topic Re:IEC Timers
Working good now.

Thanks

Please Log in or Create an account to join the conversation.

Time to create page: 0.150 seconds
Powered by Kunena Forum