Author Topic: Create Component  (Read 6534 times)

Offline LBee11

  • PLUS+1 Developer
  • ***
  • Posts: 26
  • Karma: +1/-0
Create Component
« on: April 13, 2017, 10:50:31 PM »
Is there any way to create your own component? I know I can create a page and disable the access to it, but I'd like to create a component that performs a certain function and be able to select whether the pins to the component are U8, U16, S32, BOOL etc.

Most default components allow the user to specify what data-type the pins are, it would be extremely useful to be able to make our own components with this feature, I'm hoping there is a way?

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: Create Component
« Reply #1 on: April 14, 2017, 12:00:43 AM »
There isn't a feature for this per se, but I think what you're wanting to do can be achieved a couple of ways.  It seems to me that you could do this with a ST POU or by creating your own function like with the "basic page" block.  Since the data types used in GUIDE are so often predominantly integers (U8, S8, U16, S16, U32, S32) then you can find a way to get away with implicit conversions/retypes.

That's about the closest that you're going to get I think.  You won't be able to get the drop-down where you can choose the data type of the output - that's going to have to be something that you do through a Retype component.
« Last Edit: April 14, 2017, 12:02:32 AM by FluidPowerTom »
Controls Engineer
Hydra-Power Systems