Linking spin box to parameter using conv-floaty32
- microsprintbuilder
- Offline
- Elite Member
Less
More
- Posts: 163
- Thank you received: 4
01 May 2019 14:51 #132441
by microsprintbuilder
Attachments:
Please Log in or Create an account to join the conversation.
- microsprintbuilder
- Offline
- Elite Member
Less
More
- Posts: 163
- Thank you received: 4
01 May 2019 15:52 #132445
by microsprintbuilder
Replied by microsprintbuilder on topic Linking spin box to parameter using conv-floaty32
Attachments:
Please Log in or Create an account to join the conversation.
- microsprintbuilder
- Offline
- Elite Member
Less
More
- Posts: 163
- Thank you received: 4
01 May 2019 15:53 #132446
by microsprintbuilder
Replied by microsprintbuilder on topic Linking spin box to parameter using conv-floaty32
error photo
Please Log in or Create an account to join the conversation.
01 May 2019 23:08 #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 or Create an account to join the conversation.
- microsprintbuilder
- Offline
- Elite Member
Less
More
- Posts: 163
- Thank you received: 4
02 May 2019 00:49 #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 or Create an account to join the conversation.
02 May 2019 10:50 #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 or Create an account to join the conversation.
- microsprintbuilder
- Offline
- Elite Member
Less
More
- Posts: 163
- Thank you received: 4
02 May 2019 16:31 - 02 May 2019 16:34 #132546
by microsprintbuilder
Replied by microsprintbuilder on topic Linking spin box to parameter using conv-floaty32
Last edit: 02 May 2019 16:34 by microsprintbuilder.
Please Log in or Create an account to join the conversation.
02 May 2019 23:07 #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 or Create an account to join the conversation.
03 May 2019 01:08 - 03 May 2019 01:08 #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.
net signal1 some-pin conv_float_s32.in
net signal2 conv_float_s32.out some-other-pin
Last edit: 03 May 2019 01:08 by andypugh.
Please Log in or Create an account to join the conversation.
- microsprintbuilder
- Offline
- Elite Member
Less
More
- Posts: 163
- Thank you received: 4
03 May 2019 14:14 #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 or Create an account to join the conversation.
Time to create page: 0.162 seconds