05-27-2015 10:19 AM
05-27-2015 10:23 AM
I'm currently reading the device serial number from NI max, the VISA resource name for the Arduino is ASRL4::INSTR. Is there a way to read the device serial number directly from LabVIEW using the VI or block diagram?
05-27-2015 10:28 AM
05-27-2015 10:32 AM - edited 05-27-2015 10:32 AM
In the LabVIEW VI you have to enter the device name under the "Device Configuration" section, by serial number I thought 'mikeporter' was referring to the device name. As I said, I'm a bit new to using LabVIEW and microcontrollers, I'm still trying to learn the basics of how to interface various programs and external devices.
05-27-2015 10:47 AM
05-27-2015 12:12 PM
I probed the output of the VISA read, this is what it gave me, ASRL4::INSTR for the value. I also probed some of the other wires, and the only thing going into the "Waveform Chart" is the offset for each of the axes. I also noticed that the wire coming from "NI-845x Device" is giving an error. The value for it says "{status=> True,code => -301706, source => Proper Node (arg 1) in ST_Accel.vi".
You mentioned that I should not be using VISA Bytes at Serial Port, how would I know if I am using VISA Bytes at the Serial Port?
Per your request, here is the serial monitor in the Arduino IDE displays, note that I'm using +/- 2g, so 1g is equivalent to 16384. The data below is when the accelerometer chip was sitting on the table.
x: 832 y: 64 z: 17536
x: 768 y: 128 z: 17792
x: 704 y: 0 z: 17792
x: 832 y: 128 z: 17792
x: 768 y: 64 z: 17600
x: 768 y: 64 z: 17664
x: 640 y: -192 z: 17664
x: 704 y: -64 z: 17664
x: 768 y: -64 z: 17664
x: 768 y: 128 z: 17856
x: 640 y: 128 z: 17600
x: 704 y: 128 z: 17664
x: 704 y: 128 z: 17728
I would also like to mention that I greatly appreciate you taking the time to help me out.
05-27-2015 12:33 PM
05-27-2015 12:52 PM - edited 05-27-2015 01:00 PM
It seems that I'm just gettings 0's for the x,y, and z values. LabVIEW has no zoom-out function so I could not get the entire diagram in 1 picture. I have attached 2 images of my block diagram, the first block diagram displays pretty much everything in the diagram, but I wanted to ensure that you could see the entire diagram. Can you download PNG files on your phone? If not just let me know how you want me to send you the pictures.
05-27-2015 01:31 PM
05-27-2015 02:11 PM - edited 05-27-2015 02:12 PM
I downloaded this VI from another forum, I can't believe I overlooked something so simple. So I have to change the NI845 configuration block and the initial NI845 block with Arduino blocks, is that all?