custom hal component failed to compile, undeclared (first use in this function)

More
3 years 10 months ago #259955 by andypugh
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.

More
3 years 10 months ago #259956 by smc.collins
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

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

More
3 years 10 months ago #259987 by andypugh

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.

More
3 years 10 months ago - 3 years 10 months ago #259992 by smc.collins
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 
Attachments:
Last edit: 3 years 10 months ago by smc.collins.

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

More
3 years 10 months ago #260008 by andypugh
Your switch statement is malformed. The format is
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.

More
3 years 10 months ago #260014 by smc.collins
default or fault ??

 

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

Time to create page: 0.144 seconds
Powered by Kunena Forum