LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how can I do to visualise my modbus registers on a chart?

Solved!
Go to solution
oh i forgot to put here my VI. Thanks again:)
0 Kudos
Message 11 of 20
(1,658 Views)

What do you mean by "play button"?

 

Your spreadsheet file will only contain the data from the last time the VI is run because a True constant is not wired to the Append to File? input.

 

Even if you did wire a true, you might have a mish-mash of data since one file would contain a mix and match based on the different cases that are run each time the VI is called.

0 Kudos
Message 12 of 20
(1,656 Views)

Oh...sorry it's not a play button it's a RUN button...

the problem was that i want to read specific registers, like only the ones for voltage, frequency, and current, but they are not consecutive registers, so i can not give a starting register and a quantity to read them all toghether, so i tried to build a tab control that contains as many MB serial master query as i need, each one of them for one of my parameter...but when i run the VI only the tab that is in front is running, the other ones are not reading registers, so i have to run each one of them individually....so, i'm in a little bit of trouble

Message Edited by BlueEyed on 07-01-2009 11:17 PM
0 Kudos
Message 13 of 20
(1,646 Views)

In general, tab controls aren't attached to any other code.  They are there to just help you organize your front panel.

 

What you will want to do is create an array of elements that contain all of your various registers you want to read.  Put your Modbus code in a For loop.  Wire the the array into the For Loop with Autoindexing Enabled.  Now the For Loop will run once for each element in the array and use each element of the array in term.

 

You will still need to turn your VI into more of a program.  Right now it only runs once.  You will want to put a while loop around all the code that runs continuously (like the communicatio code).  Put the initialziation functions before the while loop, and the cleanup functions after the while loop.  Use a Stop button wired to the While Loop's Stop terminal to end the program.  Much of your code is duplicated unnecessarily right now.

0 Kudos
Message 14 of 20
(1,643 Views)
If you can and want can you please show me, i mean please build it for me...i Know i'm pushing my luck here, but, i'm limited by time, and today I have to write some theory about the project:(
0 Kudos
Message 15 of 20
(1,641 Views)
0 Kudos
Message 16 of 20
(1,628 Views)

thank you verry much you are the best:D

you saved my life.thank you a lot.

best regards Sylvia

0 Kudos
Message 17 of 20
(1,621 Views)

can somehelp me out. im new to labview. Im doing a small project on communication between two computers via labview on modbus protocol. So we have to select the com port in the field dats written "visa resource name" but somehow there are no options in mb serial init.vi. it only has "refresh". wat could be the reason that i dont see the drop down menu to choose the com port in "visa resource name" ???

0 Kudos
Message 18 of 20
(1,512 Views)

You really need to start a new thread rather than hijacking this one since you have a different problem.

 

Do any of your serial ports show up in Measurement and Automation Explorere (MAX)?  They have to show up there before they show up in LabVIEW.

Are you sure you have NI-VISA installed?

0 Kudos
Message 19 of 20
(1,495 Views)

thank you sooo muc. I just had no idea how to do that before. Thanks a ton. And sorry, next time will start a new thread. 🙂 

 

cheers.

0 Kudos
Message 20 of 20
(1,480 Views)