7i84U sink/source

More
5 months 2 weeks ago #346357 by Twitchy88
7i84U sink/source was created by Twitchy88
Hello

Looking for help on where I go to change the 7i84U outputs to sink/source. the manual says I need to change the output parameters, is this done in hal?

Thanks

Please Log in to join the conversation.

More
5 months 2 weeks ago #346360 by PCW
Replied by PCW on topic 7i84U sink/source
Yes, it's done with a setp command in the  hal file

I don't have the parameter names in front of me, but you can find
them by running:

halcmd show all | grep source

and

halcmd show all | grep sink

when LinuxCNC is running

 

Please Log in to join the conversation.

More
5 months 2 weeks ago #346361 by Twitchy88
Replied by Twitchy88 on topic 7i84U sink/source
So I write setp hm2_7i96s.0.7i84.0.0.output_sink in the hal file? 

I really underestimated the complexity of this.

Please Log in to join the conversation.

More
5 months 2 weeks ago #346362 by PCW
Replied by PCW on topic 7i84U sink/source
Yes, for example to set the first 8 outputs ( 0..7 )  to sink mode
and the last 8 outputs ( 8..15 ) to source mode, you would put:

setp hm2_7i96s.0.7i84.0.0.output_sink      0x00FF  
setp hm2_7i96s.0.7i84.0.0.output_source 0xFF00

In your hal file
 

Please Log in to join the conversation.

More
5 months 2 weeks ago #346363 by Twitchy88
Replied by Twitchy88 on topic 7i84U sink/source
I think i get it now, but can you double check what you wrote isnt backwards.

From the manual:
"Sinking mode is similarly enabled by setting the corresponding sink bit to ‘1' and source bit to ‘0'

 

Please Log in to join the conversation.

More
5 months 2 weeks ago #346364 by Twitchy88
Replied by Twitchy88 on topic 7i84U sink/source
i want to make them all sinking i think its this?

setp hm2_7i96s.0.7i84.0.0.output_sink 0xffff

setp hm2_7i96s.0.7i84.0.0.output_source 0x0000
 

Please Log in to join the conversation.

More
5 months 2 weeks ago #346365 by PCW
Replied by PCW on topic 7i84U sink/source
Yes

 

Please Log in to join the conversation.

More
5 months 2 weeks ago #346373 by Twitchy88
Replied by Twitchy88 on topic 7i84U sink/source
thanks for your help! I got the outputs working.

Please Log in to join the conversation.

More
5 months 2 weeks ago #346380 by djdelorie
Replied by djdelorie on topic 7i84U sink/source

isnt backwards.

Bit 0 (port 0) is 0x0001 and bit 15 (port 15) is 0x8000, because the "first" bit is on the right.
 

Please Log in to join the conversation.

Time to create page: 5.386 seconds
Powered by Kunena Forum