09-07-2020 07:05 AM
Hello Everyone,
I'm reading data(RS485) from a mass flow controller(by AALBORG Instruments) in labview via VISA. The data i'm reading is the mass flow. I want to send the received data .i.e mass flow from labView to Arduino board for displaying the data on an LCD.
I'm attaching the VI in which i have used VISA Write to send the data( mass flow) to Arduino board.
I'm unable to receive any data in my arduino.
I'm receiving an error message on the serial monitor of the arduino( with respect to the arduino sketch i have written).
I'm also attaching the arduino sketch.
Any help would be really appreciated.
Thanks in advance
KB
09-07-2020 07:48 AM
What is the protocol for reading the mass flow from your device? From what I can gather from your VI, you really should NOT be using the Bytes At Port. But we need to protocol to verify that.
On your Arduino side, you are only reading 1 byte at a time. So that could cause issues. Maybe you should use Serial.readStringUntil() to read a line at a time. The other issue you have is your Arduino will easily read through all of the bytes before more comes in and that is when you are getting your "errors". Instead of showing an error, add a wait.
09-08-2020 12:04 AM
Hi,
The flow controller has an RS485 output which i'm using to set the set point and read the flow in labview.
I want to send the received data in labview to the arduino where i will interface an LCD and display the same reading.
I have tried using the Serial.readStringuntil() earlier and it still does not work. What is there that i can do? do i have to make any changes in the VI?
Thanks
KB
09-08-2020 06:00 AM
"RS-485" only defines the hardware of the bus. We need to know the format of the data being sent over the bus.
09-08-2020 04:46 PM
What hardware is talking to the flow controller? What hardware is talking to the arduino? Why is the arduino or the computer in the loop? The flow controller manual probably specifies the comm method required to send and pull your data/values.
Sounds like if the purpose is to read and write to the flow controller and display its value to an LCD then you only need one in the loop: the arduino or the PC running labview with the correct io module .... arduino sounds like the cheaper solution but really depends on the conditions/use cases/how reliable this system needs to be/how long this needs to be deployed for/etc... if you really want this system, id say check comm method for flow controller and arduino and match it... arduino has uart, spi, i2c, analog in, pwm out, digital io depending on which model.