LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial: IOCTL, IRP and Visa Write

One thing that you can try is to actually modify the VISA Configure Serial Port to actually send the termination character with the write. You are correct about the help for the termination character for the function as written but Ben and Waldemar are also correct. Inside VISA Configure Serial Port is a VISA property node. Add a new property and select Serial Settings:Serial End Mode for Writes. You can also modify the VI so that you have a termination character for Writes but none for Reads. I've attached a picture of my modified version. I don't know it this would make any difference as it would appear you're sending the correct character but it's worth a try.
Message 11 of 16
(1,264 Views)
OK. That I could not be sure of from the image.

There is something subtle going on that ecsapes me for the moment.

I will think more about this and get back to you.

I am thinking...
1) Previous cmnd not terminated...
2) Stop command not terminated...
3) Handshaking involved...
4) Devloping LV 6.1 after LV 7.0 was installed (corrupted serial config VI)...

Like I said, let me think and I will try to follow-up.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 12 of 16
(1,263 Views)
OK, I had some time to think and based on the information provided, I have nothing else to add.

Check the image Dennis posted and keep us posted if you find a solution or find something new.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 13 of 16
(1,246 Views)
HernanGrecco wrote:

> The code is really simple. Just the serial config, the move command
> (1000 1000 r) and the stop (HEX 03) command. I have attached anyway.
> I put the serial port settings as constants in order you are able to
> see them.<br><br>The problem is that I am not sure that I am sending
> exactly the same with the original program and with labVIEW because
> they appear differen in my sniffer. (See my first post)
> So: Is there any way to issue a IOCTL_SERIAL_IMMEDIATE_CHAR command
> in LabVIEW?<br><br>Thanks,<br><br>Hernan

I don't think that the difference in the kernel mode driver method which
is called should be the problem. VISA always uses normal write calls
into the COMM API and for any normal device this should be no problem.
The special method is probably meant for applications which work in char
mode only, but passing a buffer with one char to the kernel driver or a
single char alone should be no difference for the external device.

A different idea might be that the device also needs some sort of break
condition before or after the End Of Text character.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 14 of 16
(1,223 Views)

Hi,

 I am currently working on setting up a wireless network by talking to these Digi Internation Zigbee RF modules that communicate via the UART (com port).  I am able to write data to one of the devices and then have that module transmit that data to the other module successfully through the LabVIEW VISA functions, but what I am not able to do is have the receiving module then read the data in its DO buffer and sent it to the computer.  

 

I have a serial port monitor to look at what is happening and it looks like it is talking to the com port right by sending IRP_MJ_READ and then sending a IOCTL_SERIAL_WAIT_ON_MASK. The CTS, however, doesn't seem to get deasserted successfully for the device to read out the data, and I am having trouble to make LabVIEW do it with the VISA read function.  

 It seems like my port is configured correctly?

Right now, when I use the VISA read function in LabVIEW, it gives a timeout error waiting for the device which I don't understand.  

 

Any help would be greatly appreciated.  Thanks. 

0 Kudos
Message 15 of 16
(918 Views)
I think you really have a different question than what was discussed in this 4 year old thread.

I recommend that you start a new thread with your question.
0 Kudos
Message 16 of 16
(916 Views)