LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

com port write cfp-2120

Have a host PC running LabVIEW8.2 with RT.
Have a cFP-2120 connected via Ethernet.
All IO modules and controller visable in MAX.
 
Running a LV program on the host PC with a subVI that is supposed to use the cFP controller to output a serial message string to a device.
 
Have a LV project.
Have imported IAK.
Have placed the subVI under the controller in the project.
The subVI runs correctly, deploying to the cFP, if I right click and select run to use it manually.  I can select any serial port on the controller.
However, when running the main program on the host PC and calling the subVI, even if I change where run in the lower left corner of the VI, it cannot see all the serial ports on the controller.
 
Stuck.
 
0 Kudos
Message 1 of 6
(3,627 Views)

Hi Wes_OH,

Does your main VI have a control that is used to pass this information into the sub VI.  Maybe you need to add a control on your Main VI front panel that will allow you to control the serial port menu selection from the sub VI.

Please let me know if you have any further questions or if I have misunderstood your question.  If the latter is the case, please either clarify the question, or post a simple example that illustrates the issue.

Best of luck on your application, and have a great day!!

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 2 of 6
(3,603 Views)

I'm using a copy of the Basic Serial Write VI.

My GUI calls subVI which is run in popup dialog mode.

I create a string from user input and some defaults.

The user selects SEND and the message is sent to Basic Serial Write.

This all works fine if I am using only the host PC and its COM1 port.

When I try to use the serial port of the cFP-2120 controller, I cannot "see" it on the list of ports.

I have created a connector on the Basic Serial Write VI accessing the VISA resource control there.

I have created a VISA resource control on the subVI and connected it to the Basic Serial Write VI.

I have created a connector on the subVI referencing the VISA resource control.

I have created a VISA resource control on the main program GUI and connected it to the subVI.

I still only see COM1 and LPT1.

 

 

0 Kudos
Message 3 of 6
(3,601 Views)

Hi Wes_OH,

Is your application running embedded on the cFP controller?  Also, do you have NI-VISA installed on your cFP-controller?

I hope to hear from you soon.

Regards,
Ching P.
DAQ and Academic Hardware R&D
National Instruments
0 Kudos
Message 4 of 6
(3,588 Views)


@Wes_OH wrote:

However, when running the main program on the host PC and calling the subVI, even if I change where run in the lower left corner of the VI, it cannot see all the serial ports on the controller.


The program running on the host PC is only able to see the serial ports on the host PC.  It will not see any serial ports on the target cFP.
 
Your program will have to run on the cFP in order to be able to access the serial ports on the cFP.
0 Kudos
Message 5 of 6
(3,583 Views)
Right.
I'm set now.
 
Simplified the question and asked again in another thread.
Just completed the discussion and I'm on board with the example working fine.
 
 
 
0 Kudos
Message 6 of 6
(3,580 Views)