01-27-2020 03:46 AM
Hi,
I am trying to make a program where if I sent a concrete number plot I want to see if the signal SVRE of the ring activates.
I attach the program.
01-27-2020 03:58 AM
Hi 99,
@labview99 wrote:
I am trying to make a program where if I sent a concrete number plot I want to see if the signal SVRE of the ring activates.
This ring control named "Ring" is just a control on the frontpanel of your VI. The item "SVRE" will be selected by the user of your VI…
To detect if the user has selected "SVRE" you can use a simple comparison of the ring value with 2, as this is the value chosen for the "SVRE" item.
How is the ring control value related to that EthernetIP stuff at all?
01-27-2020 04:00 AM
Sorry, I haven´t explained well.
I want to insert one number plot ( in the data to set), I want to write 0 2 0 0 0 0 0 0 0 0 0 0 0....
so when I write this I want to verify if the case 2 of the case structure, which corresponds to SVRE, is activated.
01-27-2020 04:13 AM
Hi 99,
@labview99 wrote:
I want to insert one number plot ( in the data to set), I want to write 0 2 0 0 0 0 0 0 0 0 0 0 0....
so when I write this I want to verify if the case 2 of the case structure, which corresponds to SVRE, is activated.
So you send this "data to set" to another device (by EthernetIP). Then you receive an answer from that device.
In the next frame a ring control on the frontpanel is read and it's value is used to select a case.
When you want to verify the user of your VI has selected the correct case then you need to place some code inside this case, like a OneButtonDialog…
(I still don't get what you want to achieve with this ring control and the EthernetIP stuff.)
01-27-2020 04:23 AM
Yes, that´s it. I send the "data to set" to another device. ANd what I have to see in the answer of the device in the "data received" is 2 64 0 0 0 0 0. And I know that this 2 64 0 0 0 0 0.... corresponds to the case 2 of the case structure.
I hope I have explained better myself.
01-27-2020 05:46 AM
01-27-2020 05:55 AM - edited 01-27-2020 05:55 AM
What I have to do is to put in each case of the case structure the corresponding binary code of the number. For example I have to put in the case 2. 00000010
I put it just like an string constant?
01-27-2020 07:22 AM
Hi 99,
@labview99 wrote:
What I have to do is to put in each case of the case structure the corresponding binary code of the number. For example I have to put in the case 2. 00000010
I put it just like an string constant?
I don't understand what you are asking here…
You get an array of (u8) numeric values. Why do you think you need to write a "binary code" as selector value in the case structure?
Why do you think you need to use string constants???
(A numeric value is just a numeric value - its representation/formatting in the frontpanel is irrelevant…)