NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: IEC Timers

Re:IEC Timers 09 Июл 2012 08:47 #21722

  • LAIR82
  • LAIR82's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 199
  • Thank you received: 5
  • Karma: 2
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
The administrator has disabled public write access.

Re:IEC Timers 09 Июл 2012 09:01 #21723

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4960
  • Thank you received: 87
  • Karma: 134
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
The administrator has disabled public write access.

Re:IEC Timers 09 Июл 2012 09:51 #21724

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4140
  • Thank you received: 141
  • Karma: 130
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.
The administrator has disabled public write access.

Re:IEC Timers 09 Июл 2012 12:16 #21726

  • LAIR82
  • LAIR82's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 199
  • Thank you received: 5
  • Karma: 2
Working good now.

Thanks
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 1.092 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.