VFD mb2hal

More
8 years 7 months ago #107555 by BigDo
Replied by BigDo on topic VFD mb2hal
Todd can you send me the hal File from your running mashine that use mb2hal?

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

More
8 years 7 months ago #107556 by Todd Zuercher
Replied by Todd Zuercher on topic VFD mb2hal
They are a little messy, but I'm sure I've posted on the forums before.

Most of the hal pin connections to Mb2hal are in the hal file "mb2hal.hal".

File Attachment:

File Name: Digital6.zip
File Size:44.65 KB
The following user(s) said Thank You: BigDo

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

More
8 years 7 months ago - 8 years 7 months ago #107715 by BigDo
Replied by BigDo on topic VFD mb2hal
thanks for nice examples Todd
i have managed to control the VFD directly over the test hal command
setp mb2hal.set.reference.frq.00 200 - Reference Frequency
setp mb2hal.set.cmd.parameters.00 32778 - forward
setp mb2hal.set.cmd.parameters.00 34826 - reverse
setp mb2hal.set.cmd.parameters.00 36874 - Stop

but how can i use the axis spindle Buttons or pyvcp Buttons in my custom hal-File to set this values, they only accept Bit values - i have decimals?

this is my mb2hal ini File

File Attachment:

File Name: altivar_atv28.ini
File Size:10.18 KB

this is my custompanel xml File

File Attachment:

File Name: altivar-atv28.xml
File Size:3.62 KB

this is my custom_postgui hal File

File Attachment:

File Name: altivar_atv28.hal
File Size:866 B
Last edit: 8 years 7 months ago by BigDo.

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

More
8 years 7 months ago - 8 years 7 months ago #107717 by andypugh
Replied by andypugh on topic VFD mb2hal
A mux4 would work for this, or potentially a mux8.

What data type are the parameters.00 pins? I would guess U32 (unsigned integer).

If they are U32 then a mux_generic would be easier than a mux4.
Code:
loadrt mux_generic config="uu4" ... addf mux-gen.00 servo-thread ... net spindle-fwd motion.spindle-forward => mux-gen.00.sel-bit-00 net spindle-rev motion.spindle-reverse => mux-gen.00.sel-bit-01 net vfd-param mux-gen.00.out => mb2hal.set.cmd.parameters.00 #Off = 00 (0), FWD = 01 (1), Rev = 10 (2), Both (error) = 11 (3) setp mux-gen.00.in-u32-00 36874 setp mux-gen.00.in-u32-01 32778 setp mux-gen.00.in-u32-02 34826 setp mux-gen.00.in-u32-03 36874

(I think I would use hex, 0x900A, 0x800A, 0x880A)

This is reasonably easily expandable for more conditions (error inputs, for example)
Last edit: 8 years 7 months ago by andypugh.

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

More
8 years 7 months ago - 8 years 7 months ago #107718 by BigDo
Replied by BigDo on topic VFD mb2hal
thanks for quick answer

the pin mb2hal.set.cmd.parameters.oo are float type
Owner = 18
Type = float
Dir = IN

and if i want to use Hex how can i do that? A example would be nice :)
Last edit: 8 years 7 months ago by BigDo.

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

More
8 years 7 months ago #107719 by andypugh
Replied by andypugh on topic VFD mb2hal
In that case you can use a conventional mux4, or change the mux_generic to config="uf4".

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

Time to create page: 0.101 seconds
Powered by Kunena Forum