- Posts: 723
- Thank you received: 139
custom hal component failed to compile, undeclared (first use in this function)
- smc.collins
- Offline
- Platinum Member
-
Less
More
3 years 9 months ago - 3 years 9 months ago #261128
by smc.collins
Replied by smc.collins on topic custom hal component failed to compile, undeclared (first use in this function)
more debugging, logic changes, redesigned timers and this is passing all of my unit tests I created. Next step, machine testing.Anybody know how to pass a float value into a component pin in ? I have been trying with no sucess. s32 whole numbers are fine thoughnoticed slightly out of date version with a few bugs I already squashed.
Last edit: 3 years 9 months ago by smc.collins.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
Less
More
- Posts: 12170
- Thank you received: 4153
3 years 9 months ago #261130
by rodw
Replied by rodw on topic custom hal component failed to compile, undeclared (first use in this function)
Floats are supported. Available types for pins are covered in the docs here
linuxcnc.org/docs/2.9/html/hal/comp.html#_definitions
linuxcnc.org/docs/2.9/html/hal/comp.html#_definitions
The following user(s) said Thank You: smc.collins
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
Less
More
- Posts: 723
- Thank you received: 139
3 years 9 months ago #261131
by smc.collins
Replied by smc.collins on topic custom hal component failed to compile, undeclared (first use in this function)
I get that, what I didn't see was a way to pass them from the hal file to the hal component, I have tried a bunch of different methods based on the syntax of s32 etc with no sucess.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
Less
More
- Posts: 12170
- Thank you received: 4153
3 years 9 months ago #261132
by rodw
Replied by rodw on topic custom hal component failed to compile, undeclared (first use in this function)
Like this
Code:
author "Rod Webster";
pin in float joint_vel "Joint velocity (attach to joint.N.joint−vel−cmd)";
The following user(s) said Thank You: smc.collins
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
Less
More
- Posts: 723
- Thank you received: 139
3 years 9 months ago - 3 years 9 months ago #261139
by smc.collins
Replied by smc.collins on topic custom hal component failed to compile, undeclared (first use in this function)
the problem is that I can't seem to find the correct context for the hal file, I can get the pin in float to work fine. I have 6 adjustable timers, I would like to be able to set in the hal file. I can do it with s32 , I just haven't seen a example of the proper verbage for hal.
Last edit: 3 years 9 months ago by smc.collins.
Please Log in or Create an account to join the conversation.
- smc.collins
- Offline
- Platinum Member
-
Less
More
- Posts: 723
- Thank you received: 139
3 years 9 months ago - 3 years 9 months ago #261187
by smc.collins
Replied by smc.collins on topic custom hal component failed to compile, undeclared (first use in this function)
edit, fixed some bugs, this code can be modified to work with the oractoolchanger, if anyone is interested I will do my best to make the modifications required but I have NO hardware to test on.Presently I am busy now working on the HurcoCarousel.comp.
in this post in the latest file
Updated the pocket filtering scheme to include a 10 msec debounce, will test later today to see if this is cure to occasionally canceled motor runs from invalid pocket values., fixed the toolchanged notification not being sent and failing to reset the iocontrol loop
I will be doing more minor testing, edge case hunting etc this week. I have written this to the best of my ability in terms of electrical, mechanical and operational theory understanding. C and in general programming languages are new to me. If anyone wants to contribute back and update or even improve this program, please feel free to do so. There are more hal components coming for toolchanging. You can load this file into the vmc grey sim and drop in the sample hal config and add cinturnchanger.hal to the vimc ini and then you can test your ideas on tool decoding etc.
I did not implement a jog function, I gave a lot of consideration to it, and I think that the danger of jogging outweighs the inconvenience of having to call for toolchanges via the MDI, also, it's better that we go through the turret lock and test routines to ENSURE that the turret is EXACTLY where it should be so the tool offsets are correct.
if the debugging session later today fails, I will post a notification and continue updating until this program does work. I only made very small changes today and debugged them in sim, so I have a reasonable amount of confidence they are working.
in this post in the latest file
Updated the pocket filtering scheme to include a 10 msec debounce, will test later today to see if this is cure to occasionally canceled motor runs from invalid pocket values., fixed the toolchanged notification not being sent and failing to reset the iocontrol loop
I will be doing more minor testing, edge case hunting etc this week. I have written this to the best of my ability in terms of electrical, mechanical and operational theory understanding. C and in general programming languages are new to me. If anyone wants to contribute back and update or even improve this program, please feel free to do so. There are more hal components coming for toolchanging. You can load this file into the vmc grey sim and drop in the sample hal config and add cinturnchanger.hal to the vimc ini and then you can test your ideas on tool decoding etc.
I did not implement a jog function, I gave a lot of consideration to it, and I think that the danger of jogging outweighs the inconvenience of having to call for toolchanges via the MDI, also, it's better that we go through the turret lock and test routines to ENSURE that the turret is EXACTLY where it should be so the tool offsets are correct.
if the debugging session later today fails, I will post a notification and continue updating until this program does work. I only made very small changes today and debugged them in sim, so I have a reasonable amount of confidence they are working.
Last edit: 3 years 9 months ago by smc.collins.
Please Log in or Create an account to join the conversation.
Time to create page: 0.153 seconds