- Posts: 19899
- Thank you received: 4655
custom hal component failed to compile, undeclared (first use in this function)
- andypugh
- Offline
- Moderator
-
Less
More
3 years 10 months ago #259955
by andypugh
Replied by andypugh on topic custom hal component failed to compile, undeclared (first use in this function)
iocontrol sits there waiting to handle specific tool-related NML messages. If it doesn't see any then it doesn't do anything.
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 10 months ago #259956
by smc.collins
Replied by smc.collins on topic custom hal component failed to compile, undeclared (first use in this function)
wouldn't it make sense to have iocontrol poll for the changer or tool number ??? or provide a path for iocontrol to receive a pocket or tool number at startup, or a way to have a persistent tool state.
is all the tool code in iocontrolv2 or is it spread out everywhere
is all the tool code in iocontrolv2 or is it spread out everywhere
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
3 years 10 months ago #259987
by andypugh
You could run a T command in [RS274NGC]RS274NGC_STARTUP_CODE
There are some posts on the forum about persistent tool numbers. But you shouldn't need that for a lathe, as the system knows where the changer is at all times.
Replied by andypugh on topic custom hal component failed to compile, undeclared (first use in this function)
wouldn't it make sense to have iocontrol poll for the changer or tool number ??? or provide a path for iocontrol to receive a pocket or tool number at startup, or a way to have a persistent tool state.
You could run a T command in [RS274NGC]RS274NGC_STARTUP_CODE
There are some posts on the forum about persistent tool numbers. But you shouldn't need that for a lathe, as the system knows where the changer is at all times.
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 10 months ago - 3 years 10 months ago #259992
by smc.collins
Replied by smc.collins on topic custom hal component failed to compile, undeclared (first use in this function)
working on that issue of " knowing where the turret is parked" I decided to do a complete rewrite of the component.Let me know if you see any obvious errors. I ran out of time tonight. I got it debugged enough to build. I really don't care for the syntax of C very much, but it is what it is
edit, noticed a misplaced pair of brackets
edit, noticed a misplaced pair of brackets
Last edit: 3 years 10 months ago by smc.collins.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
-
Less
More
- Posts: 19899
- Thank you received: 4655
3 years 10 months ago #260008
by andypugh
Replied by andypugh on topic custom hal component failed to compile, undeclared (first use in this function)
Your switch statement is malformed. The format is
You don't have the opening and closing brace for the switch, and have the "switch(progress_level)" several times inside itself.
You don't always need, or want, the "break" but it's a good idea to comment a deliberate "fall through" to the next state.
Code:
switch(value) {
case 1:
stuff
break;
case 2:
more stuff
break;
default:
default stuff
}
You don't have the opening and closing brace for the switch, and have the "switch(progress_level)" several times inside itself.
You don't always need, or want, the "break" but it's a good idea to comment a deliberate "fall through" to the next state.
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 10 months ago #260014
by smc.collins
Replied by smc.collins on topic custom hal component failed to compile, undeclared (first use in this function)
default or fault ??
Please Log in or Create an account to join the conversation.
Time to create page: 0.144 seconds