Author Topic: Inputmode_problem  (Read 10067 times)

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 123
  • Karma: +1/-0
Inputmode_problem
« on: November 03, 2021, 02:02:58 PM »
Hi!!!

I use SC050-120 pin 32 as input.
I have option to use two sensors analog and resistance.
So I have using switch to do that as showing at the first image.
As result compilation error Initialize Hardware output must be connected to an output which is valid for initialization.

Please could you help me

thanks in advance

Cordially
macbahi

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +33/-0
Re: Inputmode_problem
« Reply #1 on: November 03, 2021, 04:12:38 PM »
The inputmode along with outputmode cannot be changed programmatically like that.  You need to pick one for that program and use another input for the other sensor.
Controls Engineer
Hydra-Power Systems

Offline Matt_Eng

  • PLUS+1 Developer
  • ***
  • Posts: 21
  • Karma: +10/-0
Re: Inputmode_problem
« Reply #2 on: November 03, 2021, 09:50:09 PM »
Hi, there is a way to do this, but it does require modifying the template slightly, I've mocked up a little example for you.
To do this properly, you only want the input mode to be able to change after a power cycle.

In the sub block of the pin page, you will want to separate the Init and InputMode signal.


Then you would setup the NV component to drive the init, and limit the InputMode to only be set on the first loop.



You can also do a similar thing for setting the baudrate of a controller without requiring a recompile.
Hope this helps, Matt
« Last Edit: November 03, 2021, 09:59:14 PM by Matt_Eng »

Offline Tor

  • Administrator
  • PLUS+1 Guru
  • *
  • Posts: 288
  • Karma: +28/-1
Re: Inputmode_problem
« Reply #3 on: November 04, 2021, 08:22:48 AM »
Hello,

Just to clarify what the initial problem is.
The INIT component writes a value to the kernel before the first program loop and it only accepts inputs from constants and non-volatile memory components. So the compile error you get is probably that you have a switch connected to the INIT component.
But as Matt_Eng pointed out you can just separate the INIT and HW inputs. You can connect a constant to the INIT input and have your logic connected to the HW input.  The INIT is not used while the application is running.

You can find this information by mark the component in the component tree, and press "F1" on your keyboard.

Good Luck
Best regards,
Tor
PLUS+1® SW PAE Team

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 123
  • Karma: +1/-0
Re: Inputmode_problem
« Reply #4 on: November 04, 2021, 01:48:27 PM »
H!

Thank you very much Matt, Tom and Tor.
It's no easy for me to understand HW Init configuration but I understood your ideas.  I will do that.
But why originally it's not separate and we can change Input-mode value.
Please Could you refer where I will find more information about Init using and HW?

An other time thanks for your help,

Sincerelly
macbahi

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 123
  • Karma: +1/-0
Re: Inputmode_problem
« Reply #5 on: November 04, 2021, 10:04:58 PM »
Hello,

Please what happened if the user change configuration without reboot the controller and change the sensor.

The concerning input (C1p32) is protected or not.

Is it possible to now the C1p32.InputMode actual value in order to make logical program for tell the user to start the controller.

Thanks

Sincerely
macbahi


Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 123
  • Karma: +1/-0
Re: Inputmode_problem
« Reply #6 on: November 12, 2021, 09:59:53 PM »
Hello Guys,

Sorry for the delay in responding because I was on vacation.
I did what you suggested to me but it's not working.

Please look the image if some thing wrong.

Thanks
cordially
mac bahi

Offline Tor

  • Administrator
  • PLUS+1 Guru
  • *
  • Posts: 288
  • Karma: +28/-1
Re: Inputmode_problem
« Reply #7 on: November 15, 2021, 08:24:15 AM »
Hello,

As stated before, The INIT component writes a value to the kernel before the first program loop and it only accepts inputs from constants and non-volatile memory components. The INIT is not used while the application is running.
So if you only want to change the inputmode when running the application, try this and see if it works (see image).


Have a nice day.
Best regards,
Tor
PLUS+1® SW PAE Team

Offline G30RG3

  • PLUS+1 Expert
  • ****
  • Posts: 73
  • Karma: +3/-0
Re: Inputmode_problem
« Reply #8 on: November 15, 2021, 09:50:50 AM »
Hello Guys,

Sorry for the delay in responding because I was on vacation.
I did what you suggested to me but it's not working.
Please look the image if some thing wrong.


I'm not going to predict if it's going to work, but it sure is wrong to set write to a constant true!
See the warning in red in the Guide manual at the end of the section "Non-Volatile Memory Dynamic"

Best regards

« Last Edit: November 15, 2021, 11:05:18 AM by G30RG3 »

Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 123
  • Karma: +1/-0
Re: Inputmode_problem
« Reply #9 on: November 16, 2021, 10:35:21 PM »
Hi!!

It's working. Thanks guys for your help.

In addition I didn't need to reboot the controller. 

My special greeting to mr Tor.

Please could you send documentation that shows all configuration possible of inputs and outputs.
I am more visual.
As example in this image I know what mean pull up resistor or pull down resistor but it's no clear for me what is-it writing here in the image.


Cordially
Macbahi

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 197
  • Karma: +37/-1
Re: Inputmode_problem
« Reply #10 on: November 17, 2021, 08:57:57 AM »
There are two documents available to download from the Danfoss website that give more info on input and output configurations.

https://assets.danfoss.com/documents/53979/BC152886484248en-000301.pdf
https://assets.danfoss.com/documents/53526/BC152886483485en-000501.pdf




Offline macbahi

  • PLUS+1 Guru
  • *****
  • Posts: 123
  • Karma: +1/-0
Re: Inputmode_problem
« Reply #11 on: November 17, 2021, 06:04:12 PM »
Hi acmall

Thank you very much

Cordially