07-27-2016 01:13 AM
Hello People,
I already connected the arduino and LabView, I just want to send data from LabView to MEGA 2560 by USB (that is OK) and send that data to another serial port i.e. Tx1 Rx1 for exchange data from two 2560 and one of them connected to LABVIEW by USB.
RichardHG2016
07-27-2016 01:21 AM
07-27-2016 05:15 AM
They should talk much the same way that your Arduino does. You just have to know the command/data protocol for the instruments you are trying to talk with.
07-27-2016 05:47 PM
Hi GerdW,
I send you two pictures, The link labview Mega 2560 A is OK, but from LabView I want to send data to another Mega 2560 B, in the picture you can see, I do not know how to map other serial port to send and recive data from MEGA 2560 B.
Best regards
Richard
07-27-2016 06:33 PM
Hi Gerd,
Looks like youre trying to send data from labview to Mega A and then Mega A and B will be communicating with eachother over seial. If youre using the labview add on to write the code for both Megas youll need a second USB for the mega B to labview. Correct me if im wrong, but you cant upload code to the arduino as a real time target if running the labview add on?
Matt
07-27-2016 07:46 PM
Hi Matt,
LabView only knows about Mega_2560_A, the Mega_2560_B has a firmware that if any digital input change send that change by serial to the other 2560_A, and that Mega reports that change to the LabView, because labView is linked by USB for the Arduino Mega that is Serial Tx0 and Rx0, the 2560_A recived information in the serial Tx2Rx2, and that is what I want to see, also from LabView push a light, 2560_A send that information to the 2560_B by serial Tx2Rx2 (I just want to turn on a light connected to 2560_B)
, the firmware in the Mega_2560_B to do that is very easy. I was thinking to change the firmware we have to load to the Mega_2560_A but I am not sure if that the best option for do this.
Best Regards.
Richard.
07-27-2016 08:34 PM
07-28-2016 01:32 AM
Matt,
In my house there are two main areas, so I want to implement the control system but I need the two Mega 2560 interchange information between them.
The 2560_A with LabView is the master and the other is the slave, I do not want to connect another laptot to 2560_B.
you're having trouble having setting up the communications between A and B in labview correct? that´s right.
Thankyou in advance
Richard.
07-28-2016 11:08 AM
Richard,
Well for one make sure you cross the RX and TX for each board, didnt see that in your diagram, then youre going to have to know the data you want to send, then build the packets and send it out over the correct digital pin. You can research how to build those packets, but could be a lot of work. One thing you could do instead is create a server for mega B and control the tasks with the digital IO between the boards.
07-29-2016 07:25 AM