11-17-2013 12:20 AM
Other kind of question........
If I would like tohave a txt message in case of alarm (High PH or temperature or a loss of power ), which module would you suggest me to find do this?
The all system is under Inverter that can support the pumps for ca. 1 hr.
So in case I am not at home I will have 1 hr. to get back and avoid to have too much water on the flow..........
Thanks again
Have a good Sunday
Andrea
11-17-2013 02:25 AM
For the method that does not require modifying LIFA:
You would still only need a single debugger. You would connect that to both Serial multiplexers and then enable/disable (E pin) and select which line (S0 and S1 pins) to use with Arduino. Here is a really bad drawing of how you would wire it in this method:
This allows you to control the multiplexers with Arduino but then communicate via the debugger with the sensors.
*** The only thing I'm unsure about is the ground pins. I'm assuming that the grounds will be implicitly connected through the USB grounds.
Psuedocode to talk to sensor on A_Y1 (second sensor of multiplexer A):
set E_B high
set E_A low
set S0 high
set S1 low
talk_to_sensor_with_LabVIEW()
With this set up, you only need to create serial communication VIs in LabVIEW (instead of in Arduino and LabVIEW by modifying LIFA).
11-17-2013 03:18 AM
Hi Nathan_B,
it looks a simple way around.
why not!
I will order a Debugger immidiately so we can try this interesting solution.
Question:
The USB port from the Debugger to the PC is read directly by LabView?
If yes, I have to coordinate signals from the USB 1 connected to the Arduino and read the answer on the USB2?
Life is always full of new challenges!
But thanks, this debugger solution is giving me some hope.
will let you know when I have it here.
Best regards and thanks again
Andrea
11-17-2013 02:38 PM
I only suggested this method because I thought you already had a debugger so that you could verify that the sensors were working. You can do it either way but it's up to you regarding which method you feel most comfortable with.
The debugger should show up like any other COM port and can be used with the VISA drivers (See the Advanced Serial Write and Read.vi example).
For "coordination", you simply perform the pseudocode that I previously wrote (in that order) for you to execute the operation.
11-17-2013 06:50 PM
Sending all serial signals through a debugger has promise. However, as far as I know Labview can not support 2 serial read write ports concurrently.. Labview can read from one COM port and write to a second.COM port. There is an example that comes with Labview that does this. But no example of reading and writing to two COM ports concurrently.
After using Google to see if two copies of Labview can run simultaneously it looks to be possible but complex.
One possible approach is to not connect Labview to the COM port connected to the debugger. Instead uses a separate program, for example Python, to read the data coming from the debugger's COM port and store the data in files with shared access. Labview could then get the data from the files. Labview could be restricted to read only access thereby keeping the data from getting corrupted when two programs tried to write to the same file.
LINX will offer another approach when it is available. Sammy says it will support Ethernet. If Ethernet is available you could use Ethernet to control an Arduino Mega and the COM port to red the data coming from the debugger.
With regard to text messages see:
<http://digital.ni.com/public.nsf/allkb/5C55FAEDC7BF5C0C862570930054D39F>
Hrh1818
11-17-2013 07:25 PM
hrh1818 wrote:
Sending all serial signals through a debugger has promise. However, as far as I know Labview can not support 2 serial read write ports concurrently.. Labview can read from one COM port and write to a second.COM port.
Hrh1818
This can't be true. I've done it before with two Arduino Mega's connected simultaneously (and continuously). Also, according to this document, you can have up to 256 serial ports (it refers to RS232 and RS485 hardware but shouldn't matter).
11-18-2013 05:05 PM
Hello Nathan,
That is exciting news being to use LIFA to control two Arduino Megas. Your approach is much more productive than the non LIFA approach I was piddling with.
hrh1818
11-25-2013 11:30 PM
And here they are, just got the package from Atlas Scientific with the Debugger
Will slowly start to see how it horks.
Please some some directions......... (I got 2 so if I blow one.........)
Regards
Andrea
11-26-2013 01:18 AM
Hello there,
first question:
I have to download the driver for the Debugger and they ask for: Virtual COM Port (VCP) drivers and direct (D2XX) drivers
apparently the driver is not the same....
Which one do I have to use to follow your schema?
Thanks
Andrea
11-26-2013 01:56 AM