NEWS
LinuxCNC 2.5.2 Release
LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release

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
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

TOPIC: u32 image

u32 image 11 Jul 2011 04:53 #11387

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
how do i set the halpin to interger value ?
in the xml file or hal ?
if in hal, pyvcp.testimage0
pyvcp.testimage1
etc ...



The "image_u32" is the same as "image_bit" except you have essentially an unlimited number of images and you "select" the image by setting the halpin to a integer value with 0 for the first image in the images list and 1 for the second image etc.


Thanks
kenneth
The administrator has disabled public write access.

Re:u32 image 11 Jul 2011 05:47 #11393

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4126
  • Thank you received: 141
  • Karma: 129
I am not completely sure what the question is, but if you want to choose different images based on a number of bit-type inputs then the "weighted_sim" component might help.
(I don't know why it is called that, a better description would be "bit2binary")
The administrator has disabled public write access.

Re:u32 image 11 Jul 2011 06:16 #11397

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
i'm trying to use u32 image

linuxcnc.org/docs/html/hal_pyvcp.html section 1.6.6.2 Image u32
The administrator has disabled public write access.

Re:u32 image 11 Jul 2011 06:23 #11398

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4126
  • Thank you received: 141
  • Karma: 129
Yes, I understand that you are trying to use u32Image. My question is about how you want to control it.

What is the data type of the date you want to indicate?
The administrator has disabled public write access.

Re:u32 image 11 Jul 2011 07:44 #11409

  • piasdom
  • piasdom's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 537
  • Karma: 2
well, i'm trying to use a button to change the image three times.as with image_bit.
i found a u_32 pin(halui.joint.selected) and used that to get the pyvcp button to show in axis.
now i'm trying to click the button to change the images. i have the button and the
first image is displayed but never changes. but the way you asked the question makes me think
i don't understand u32 :)


Thanks
kenneth
The administrator has disabled public write access.

Re:u32 image 11 Jul 2011 08:09 #11415

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4126
  • Thank you received: 141
  • Karma: 129
piasdom wrote:
well, i'm trying to use a button to change the image three times.as with image_bit.
i found a u_32 pin(halui.joint.selected) and used that to get the pyvcp button to show in axis.
now i'm trying to click the button to change the images. i have the button and the
first image is displayed but never changes. but the way you asked the question makes me think
i don't understand u32 :)

I think you will find that the image change if you select a different joint....
Click the X Y Z buttons in the Axis UI and you will probably see the image change.

You need to have a u32 pin which has a value that changes as a result of your button press.
I can think of ways to make a value count up by one every time a pyvcp button is pressed, but it is likely to involve a lot of edge detectors and other functions
The administrator has disabled public write access.
Time to create page: 0.835 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.