- Posts: 106
- Thank you received: 0
Linking spin box to parameter using conv-floaty32
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
Less
More
7 years 5 months ago #132441
by microsprintbuilder
I’m trying to connect values from a spin box in my panel to some stepgen values to control on, off, and frequency of the stepgen that runs spark box for edm. I get a error value invalid.
Attachment not found
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 106
- Thank you received: 0
7 years 5 months ago #132445
by microsprintbuilder
Replied by microsprintbuilder on topic Linking spin box to parameter using conv-floaty32
Attachment not found
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 106
- Thank you received: 0
7 years 5 months ago #132446
by microsprintbuilder
Replied by microsprintbuilder on topic Linking spin box to parameter using conv-floaty32
error photo
Please Log in to join the conversation.
7 years 5 months ago #132466
by BigJohnT
Replied by BigJohnT on topic Linking spin box to parameter using conv-floaty32
It's better to copy and paste the text if possible, I can't quite read the error photo but it might be a type error like trying to use a float where it should be u32 etc.
I don't know anything about that GUI but if you can open a hal watch window you can see what type of number your needing.
JT
I don't know anything about that GUI but if you can open a hal watch window you can see what type of number your needing.
JT
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 106
- Thank you received: 0
7 years 5 months ago #132472
by microsprintbuilder
Replied by microsprintbuilder on topic Linking spin box to parameter using conv-floaty32
yes , I've done that and found a comp called conv-float-u32 to convert the float to u32. It doesn't seem to do the job or I'm implementing it wrong. If I comment out the error line and run and read the hal I can see that it does convert to u32 . but I still get the error that the value ' conv-float-u32-0-out ' is invalid for U32
Please Log in to join the conversation.
7 years 5 months ago #132510
by BigJohnT
Replied by BigJohnT on topic Linking spin box to parameter using conv-floaty32
No way to guess what the problem is unless we can see the hal line, the input value and the exact error.
linuxcnc.org/docs/devel/html/man/man9/conv_float_u32.9.html
But I'm going to guess anyway that the input value is not in the range of u32. An unsigned 32-bit integer has a usable range of zero to 4,294,967,296.
JT
linuxcnc.org/docs/devel/html/man/man9/conv_float_u32.9.html
But I'm going to guess anyway that the input value is not in the range of u32. An unsigned 32-bit integer has a usable range of zero to 4,294,967,296.
JT
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 106
- Thank you received: 0
7 years 5 months ago #132546
by microsprintbuilder
Replied by microsprintbuilder on topic Linking spin box to parameter using conv-floaty32
So I setp steplen to a value (500) instead of conv-float-u32.0.out and put that same value (500) into the spinbox. I then ran it and pulled up the HAL and looked at the values.
steppen.04.steplen is identical to conv-float-u32.0.out .
Attachment not found
Attachment not found
Attachment not found
Attachment not found
Please Log in to join the conversation.
7 years 5 months ago #132572
by BigJohnT
Replied by BigJohnT on topic Linking spin box to parameter using conv-floaty32
I'm getting the same error as you testing here so I'm assuming you can't set a pin using the output of a function probably because the hal file is read before the thread is run.
JT
JT
Please Log in to join the conversation.
7 years 5 months ago #132587
by andypugh
Replied by andypugh on topic Linking spin box to parameter using conv-floaty32
Setp takes a numerical value.
It makes no sense to use setp in the way that you are.
All that you need to do is use "net" instead of "setp" and to create a new signal name to link the result.
It makes no sense to use setp in the way that you are.
All that you need to do is use "net" instead of "setp" and to create a new signal name to link the result.
Code:
net signal1 some-pin conv_float_s32.in
net signal2 conv_float_s32.out some-other-pin
Please Log in to join the conversation.
- microsprintbuilder
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 106
- Thank you received: 0
7 years 5 months ago #132634
by microsprintbuilder
Replied by microsprintbuilder on topic Linking spin box to parameter using conv-floatu32
So I've tried that and get a error that steplen pin does not exist. Could you give me a example how would you go about connecting a gladevcp spinbox to a spepgen steplen parameter? What I'm trying to do is control the length of the on time on a stepgen to control my mosfet board in my wire edm spark box. And then us velocity to control the frequency in which its happening. The times can be anywhere from 40 milliseconds up. Right now I have a arduino doing that. I'd like to have linuxcnc do it all if possible.
Please Log in to join the conversation.
Time to create page: 0.107 seconds
