LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trigger external serial communication with DAQmx on PXIe Chassis

Solved!
Go to solution

Hi Everyone,

 

   I have an issue which should be easy to solve, but I have failed.  I have a program running on a PXIe-1082 chassis using the Multifunction DAQ 6368.  See below.

 

TriggerDAQmx.PNG

The while loop is hardware triggered from an input to "Digital Trigger Source".  The triggering works perfectly and the code runs exactly as I would expect. 

 

Now, I would also like to trigger the following serial communication program.SendSerial.PNG.  

My problem is that this serial communication program is located on my local computer and NOT the PXIe chassis.  It looks like I need one of the following solutions:

1) Transfer the triggering information from the PXIe chassis to the local computer, or

2) Set up the embedded controller on the chassis to perform the serial commands (seems hardest).

 

I have tried creating a local boolean tied to the iteration of the triggered while loop (even or odd), and using that as a trigger-like control for the serial loop, but I need the boolean to act like a latching mechanical action, which doesn't appear like to correct approach.

 

Thanks in advance for any suggestions!

0 Kudos
Message 1 of 8
(1,460 Views)
Serial communication is not particularly fast, why do you need to trigger it instead of just using data flow? Can you tell us from a high level what you are trying to do?
0 Kudos
Message 2 of 8
(1,401 Views)

Hi Gregory,

 

   Thank you for your response.  I am performing an experimental sequence with many steps that is controlled from my PXIe chassis.  The sequence lasts about 1s.  I need the serial communication to send out one (and only one) command (from my local machine) at a specific time within that experimental sequence.  I understand that this is not a fast process, I just need it to be synchronous with a particular piece of the experimental sequence.  Hopefully this is more clear.

 

I do not know how to use data flow from my PXIe chassis to the local machine. Please forgive my ignorance.

 

It also looks like I misunderstood the "VI snippet" concept.  Allow me to modify my original post (my first ever post, if you couldn't tell).

0 Kudos
Message 3 of 8
(1,397 Views)

Here are the VI snippets I should have included from the start.

TriggerDAQmx.PNG

SendSerial.PNG

0 Kudos
Message 4 of 8
(1,388 Views)

When you say you have code running on the chassis, does that mean you have a controller (CPU) installed in the chassis?

0 Kudos
Message 5 of 8
(1,382 Views)

Yes.  I have an 8820 embedded controller running RealTime Phar Lap ETS 13.1.  The serial command program is running on a Windows 7 machine.

0 Kudos
Message 6 of 8
(1,378 Views)
Solution
Accepted by jtallant79

This article should give you some options to communicate between the PC and your RT system.

 

https://zone.ni.com/reference/en-XX/help/370715P-01/lvrtconcepts/exploring_communication_methods/

0 Kudos
Message 7 of 8
(1,375 Views)

Thank you!

0 Kudos
Message 8 of 8
(1,370 Views)