取消
显示结果 
搜索替代 
您的意思是: 

Trigger external serial communication with DAQmx on PXIe Chassis

已解决!
转到解答

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 项奖励
1 条消息(共 8 条)
2,459 次查看
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 项奖励
2 条消息(共 8 条)
2,400 次查看

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 项奖励
3 条消息(共 8 条)
2,396 次查看

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

TriggerDAQmx.PNG

SendSerial.PNG

0 项奖励
4 条消息(共 8 条)
2,387 次查看

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

0 项奖励
5 条消息(共 8 条)
2,381 次查看

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 项奖励
6 条消息(共 8 条)
2,377 次查看
解答
接受人 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 项奖励
7 条消息(共 8 条)
2,374 次查看

Thank you!

0 项奖励
8 条消息(共 8 条)
2,369 次查看