Floating variables in Classicladder
- CrazyPenguin
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
13 Feb 2010 15:21 #1876
by CrazyPenguin
Floating variables in Classicladder was created by CrazyPenguin
Hello to all.......
I have a problem with comparison modules in Classicladder.......
Is posible to work with floating variables in Classicladder??? (but in floating format).-
In my case, i need to make a comparison in floating format, but the values are converted to S32 automaticly.-
any help will be sincerely grateful .-
Thankyou very much.-
Sebastian
I have a problem with comparison modules in Classicladder.......
Is posible to work with floating variables in Classicladder??? (but in floating format).-
In my case, i need to make a comparison in floating format, but the values are converted to S32 automaticly.-
any help will be sincerely grateful .-
Thankyou very much.-
Sebastian
Please Log in or Create an account to join the conversation.
13 Feb 2010 17:52 #1878
by cmorley
Replied by cmorley on topic Re:Floating variables in Classicladder
No classicladder does not use floats internally.
as you found, they are converted to integers.
The float pins are just for convenience of connecting directly to floats
without using a conversion component.
as you found, they are converted to integers.
The float pins are just for convenience of connecting directly to floats
without using a conversion component.
Please Log in or Create an account to join the conversation.
- CrazyPenguin
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
13 Feb 2010 18:00 - 13 Feb 2010 18:06 #1879
by CrazyPenguin
Replied by CrazyPenguin on topic Re:Floating variables in Classicladder
ok...... so is posible to make a conditional redirectioning of a floating variable?
p.e:
if A=0 then float out 1 => float in 1
if A=1 then float out 1 => float in 2
is posible to make this in emc2 (with Classiclader or werever)
Thankyou very much.-
Sebastian
p.e:
if A=0 then float out 1 => float in 1
if A=1 then float out 1 => float in 2
is posible to make this in emc2 (with Classiclader or werever)
Thankyou very much.-
Sebastian
Last edit: 13 Feb 2010 18:06 by CrazyPenguin. Reason: I confuse variable names
Please Log in or Create an account to join the conversation.
13 Feb 2010 18:15 #1881
by cmorley
Replied by cmorley on topic Re:Floating variables in Classicladder
look at the component tristate_float :
www.linuxcnc.org/docs/devel/html/man/man9/tristate_float.9.html
maybe that could help you.
www.linuxcnc.org/docs/devel/html/man/man9/tristate_float.9.html
maybe that could help you.
Please Log in or Create an account to join the conversation.
- CrazyPenguin
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
13 Feb 2010 21:15 #1883
by CrazyPenguin
Replied by CrazyPenguin on topic Re:Floating variables in Classicladder
Yes, its working perfectly......... Thankyou very much cmorley.....
An additional question:
is posible to put two parallel output like a real tristate buffer?
float out 1 => tristate.0.in
float out 2 => tristate.1.in
tristate.0.out => float in 3
tristate.1.out => float in 3
is posible to make this (like a multiplexer)......... i intented to use the mux2 instruction but dont work!
Thanks again.-
Sebastian
An additional question:
is posible to put two parallel output like a real tristate buffer?
float out 1 => tristate.0.in
float out 2 => tristate.1.in
tristate.0.out => float in 3
tristate.1.out => float in 3
is posible to make this (like a multiplexer)......... i intented to use the mux2 instruction but dont work!
Thanks again.-
Sebastian
Please Log in or Create an account to join the conversation.
13 Feb 2010 23:07 #1885
by cmorley
Replied by cmorley on topic Re:Floating variables in Classicladder
What didn't work with the mux2 ?
Please Log in or Create an account to join the conversation.
- CrazyPenguin
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
14 Feb 2010 14:28 #1894
by CrazyPenguin
Replied by CrazyPenguin on topic Re:Floating variables in Classicladder
I make following:
loadrt mux2 count=1
addf mux2.0 servo-thread
float out 1 => mux2.0.in0
float out 2 => mux2.0.in1
mux2.0.out => float in 3
setp mux2.0.sel FALSE
If i pt any value on float out 1 or float out 2......... the float in 3 value naver change!!!!
i do not know why?
loadrt mux2 count=1
addf mux2.0 servo-thread
float out 1 => mux2.0.in0
float out 2 => mux2.0.in1
mux2.0.out => float in 3
setp mux2.0.sel FALSE
If i pt any value on float out 1 or float out 2......... the float in 3 value naver change!!!!
i do not know why?
Please Log in or Create an account to join the conversation.
14 Feb 2010 18:24 #1900
by cmorley
Replied by cmorley on topic Re:Floating variables in Classicladder
strange it seems to work for me.....
Please Log in or Create an account to join the conversation.
- CrazyPenguin
- Offline
- New Member
Less
More
- Posts: 16
- Thank you received: 0
14 Feb 2010 21:27 #1903
by CrazyPenguin
Replied by CrazyPenguin on topic Re:Floating variables in Classicladder
hi cmorley...... you are correct......
i check again and again and finally found the problem ..... the instruction works perfectly and the problem is that I wrote "addf mux2 servo-thread" instead of "addf mux2.0 servo-thread"
thanks for yor help
i check again and again and finally found the problem ..... the instruction works perfectly and the problem is that I wrote "addf mux2 servo-thread" instead of "addf mux2.0 servo-thread"
thanks for yor help
Please Log in or Create an account to join the conversation.
Time to create page: 0.103 seconds