LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to write the register values to the sensor chip? using micro controller with visa communication

hello, im working on project in which i have to measure V, I, R,. there are 40 registers in that chip. 3 are readable and others are both readable and writable and there are 7 bits in each register. how can i  write to different bit  in each register so i can enable some bits in particular register ?

How do you write register values to a sensor chip attached to arduino using LabView - NI Community

something like this but im using another micro controller not Arduino 

 

thank you in advance 

0 Kudos
Message 1 of 5
(1,397 Views)

More information needed...

 


@newmemeber123 wrote:

hello, im working on project in which i have to measure V, I, R,. there are 40 registers in that chip. 3 are readable and others are both readable and writable and there are 7 bits in each register. how can i  write to different bit  in each register so i can enable some bits in particular register ?

What chip? 

What communications protocol?  As reading and writing "registers" are also widely used terms in Modbus communications. 

 

But in general if you want to read or write just one bit you would use some form of "bit masking"  

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 5
(1,374 Views)

You provide very little information to go by. But if you want to do it with your micro controller, there needs to run a program on that microcontroller (that you can't write in LabVIEW but need to develop in whatever is the embedded development toolchain for that controller) that listens on your serial port, interpretes the incoming bytes as commands and executes them and then responds back about success or failure of that operation.

 

In the case of the Arduino example you mention, there exists an Arduino firmware that comes with the Linx Toolkit that is installed on the Arduino and then communicates with the LabVIEW Linx library. You could try to attempt to port that firmware to your controller but it is programmed in C and you would need to make most likely quite a few changes to that code to make it work for your controller.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 5
(1,346 Views)

Thank you.. The controller is already programed. I can able to read voltage but for current measurement i need to write some values in register of chip not in the controller  they may enable and i can able to read the value.. 

0 Kudos
Message 4 of 5
(1,327 Views)

Then you will have to find out if that "already programmed" controller supports commands to do that. If it doesn't, someone will have to modify this "already programmed" controller to add new commands that can be invoked over the serial interface and do the right thing. Then you can add in LabVIEW functions to send these new commands.

 

You can't magically call non-existing functionality on your controller through the serial port. Not even in LabVIEW!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 5
(1,318 Views)