Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Rewrite

Rewrite 4 years 11 months ago #10279

  • Gierula
  • Gierula's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
Hello.
Please help.
I would like to rewrite the digital value from variable X1 to variable Yn.
Selection n based on the value of P.
Changing the state to x1 does not change the state to Yn (Y4)

2_2019-05-05.jpg
Last Edit: 4 years 11 months ago by Gierula.
The administrator has disabled public write access.

Rewrite 4 years 11 months ago #10280

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
Hi Gierula,

Why not connect DV DI-di1 directly to stoDv-DO-do1 ? :blink:

/Bruno
The administrator has disabled public write access.

Rewrite 4 years 11 months ago #10281

  • Gierula
  • Gierula's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
I want to be able to choose the output while the program is running.
By means of parameter P I choose where the signal will go.
I map outputs according to P. parameters.
Last Edit: 4 years 11 months ago by Gierula.
The administrator has disabled public write access.

Rewrite 4 years 11 months ago #10282

  • brunad
  • brunad's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 247
  • Thank you received: 48
  • Karma: 11
vect_I = Da1; :woohoo:

Why declaring local variables as static ?

/Bruno
Last Edit: 4 years 11 months ago by brunad.
The administrator has disabled public write access.
The following user(s) said Thank You: Gierula

Rewrite 4 years 11 months ago #10283

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3177
  • Thank you received: 502
  • Karma: 133
You have to do a

classdef Da1 DpCollect;

and get the Dv values from Da1->Dp.

/Claes
The administrator has disabled public write access.
The following user(s) said Thank You: Gierula

Rewrite 4 years 11 months ago #10284

  • Gierula
  • Gierula's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 46
  • Karma: 0
Thank you.
Now it is working.

3.jpg
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 8.839 seconds