Useful Plasma Thread

More
8 years 2 months ago #116235 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi Rod,

Yes it is connected and working in halshow. I will search for the problem today.

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

More
8 years 2 months ago #116237 by rodw
Replied by rodw on topic Useful Plasma Thread
Very strange. Check your {} in case you have a misplaced brace in your code.
Try adding a debug output pin that is only set to true in that conditional block. eg.
Code:
int debug_test = 0; if(Normal){ debug_test = 1; } debug_output_pin = debug_test; // at the very end of the component

Then review in Halshow

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

More
8 years 2 months ago - 8 years 2 months ago #116238 by rodw
Replied by rodw on topic Useful Plasma Thread
Also try setting Normal to a default
Code:
pin in bit Normal = 0 "Test pin";

Maybe also use a temporary variable
Code:
int NormalMode = (int) Normal; if(NormalMode){ // Do Stuff

Its possible that the conditional test does not like a bit type (non-native to C) so by forcing it to a int with an implicit typedef might fix it.
Last edit: 8 years 2 months ago by rodw.
The following user(s) said Thank You: Grotius

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

More
8 years 2 months ago - 8 years 2 months ago #116241 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi Rod,

Problem is solved. It was a double command involved in the enable function.
So today i can write the rest of the code for normal cutting without probe function.
Last edit: 8 years 2 months ago by Grotius.

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

More
8 years 2 months ago #116244 by rodw
Replied by rodw on topic Useful Plasma Thread
Great work!
The following user(s) said Thank You: Grotius

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

More
8 years 2 months ago #116248 by Grotius
Replied by Grotius on topic Useful Plasma Thread
Hi Rod,

I show you a piece of code that works good when normal cutting without using the probe function.
I tested this code on a test board next to my pc.

It was hard to solve the float issue's. Turning them into integer, was not a good idea.
Now i used the orginal float value's and added a min and max difference of 0.1mm in the same code line. This works good !
And this 0.1 value is only to compare the different float's.

Usage with Mesa, will also be easy in this code example. If you have the raw input voltage for example
120 volts. And we know our torch destination voltage for example 130 volts (from cutting charts). If we then do the Torch_up signal, the torch is moving up and when reached 130 volts, we are finished.

So i can write a short code with a mesa raw arc voltage / encoder input. Do you think this is usable for you?
If handy, i can make a gmocappy load in side screen to test the code by other users, when i am finisched.
Code:
if(Normal){ if(!Torch_on_in){ Offset = Travelheight; Pause_machine = 1; Torch_on_out = 0; Cutting_trigger = 0; } if(!Torch_on_in && ( (Axis_z_eoffset >(Travelheight-0.1)) && (Axis_z_eoffset <(Travelheight+0.1)) ) ){ // if no torch on in goto travelheight. Pause_machine = 0; } if(Torch_on_in && !Torch_on_out){ // if torch on in goto pierceheight. Offset = Pierceheight; Pause_machine = 1; } if(Torch_on_in && !Torch_on_out && ( (Axis_z_eoffset > (Pierceheight-0.1)) && (Axis_z_eoffset <(Pierceheight+0.1)) ) ){ // if at pierceheight. Torch_on_out = 1; Pause_machine = 1; } if(Torch_on_in && Torch_on_out && Piercetime_reached){ // if torch on in and piercetime oke, goto cutheight. Offset = Cutheight; Pause_machine = 1; } if(Torch_on_in && Torch_on_out && Piercetime_reached && ( (Axis_z_eoffset >(Cutheight-0.1)) && (Axis_z_eoffset <(Cutheight+0.1)) ) ){ // add ark ok signal Pause_machine = 0; Cutting_trigger = 1; // we are cutting } //if(Torch_on_in && Torch_on_out && Piercetime_reached && ( (Axis_z_eoffset >(Cutheight-0.1)) && (Axis_z_eoffset <(Cutheight+0.1)) ) && !Ark_ok_in) { // Pause_machine = 1; // Torch_on_out = 0; // } if(Torch_up && Torch_on_out && Cutting_trigger && (Axis_z_eoffset <= Travelheight) ){ // torch up and limited to travelheight Offset = Axis_z_eoffset + Up_down_resolution ; Pause_machine = 0; } if(Torch_down && Torch_on_out && Cutting_trigger && (Axis_z_eoffset >= Probe_search_limit) ){ // torch down and limited to probe search limit Offset = Axis_z_eoffset - Up_down_resolution ; Pause_machine = 0; } if(!Torch_down && !Torch_up && Torch_on_out && Cutting_trigger){ // if no torch up or down, stay at current height Offset = Axis_z_eoffset; Pause_machine = 0; } }

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

Moderators: snowgoer540
Time to create page: 0.148 seconds
Powered by Kunena Forum