FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
07-08-2021 03:53 PM - edited 07-08-2021 03:54 PM
I connected a HCS01.1E to a ctrlX Core via EtherCat.
To get acces to the integrated I/O of the HCS01 I added the parameter P-0-0303.
This parameter is of type integer.
Now the question: How do I get out a single bit of this integer to use it as an boolean "input" in the IDE?
Solved! Go to Solution.
07-08-2021 04:03 PM - edited 07-08-2021 04:06 PM
I could solve it with the following function!
JavaScript;
function BitPicker (Value: number, BitPos: number) {
let newNumber = Value & BitPos;
return tools.toBoolean(newNumber)
}
You can integrate (drag and drop) the attached .png directly into your IDE.