LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to write address in LV

Hello all!
I have device connect to com-port.
Packet #=0x30 is a request for a status packet.
How and where I should write this address that I can take data?
0 Kudos
Message 1 of 4
(3,221 Views)
You can write and read from your serial port using VISA. If you have never used VISA before you can take a look at some of the shipping examples that come with LabVIEW by going to Help>>Find Examples and searching for serial.

I'm assuming you want to send #=0x30 to your device. You may be able to send this as a string, but often 0x designates that something is in HEX. If this is the case you can right click on the string control in LabVIEW and select Hex Display to enter your command in HEX. Let me know if you have any questions.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 2 of 4
(3,197 Views)
Hello!

>I'm assuming you want to send #=0x30 to your device. You may be able to send this as a string, but often 0x >designates that something is in HEX. If this is the case you can right click on the string control in LabVIEW and >select Hex Display to enter your command in HEX. Let me know if you have any questions.

Yes! I'm should you advice and write vi.
I have DP4 Amptek, you can write about this device this:
http://www.amptek.com/dpp.html

I'm carefully write all parameters com-port, but in answer, I have error (timeout).
Wits device I get demo-program and User Manual.
If it's can help, I will send it.

packet #=0x30 is a request for a status packet

Status Packet format:
Byte 1 FPGA RD addr 0x0 (Fast count LSB)
Byte 2 FPGA RD addr 0x1 (Fast count byte 2)
Byte 3 FPGA RD addr 0x2 (Fast count MSB)
Byte 4 FPGA RD addr 0x3 (MCA count LSB)
Byte 5 FPGA RD addr 0x4 (MCA count byte 2)
Byte 6 FPGA RD addr 0x5 (MCA count MSB)
Byte 7 FPGA RD addr 0x6 (FPGA version #)
Byte 8 accumulation time LSB (1mS per bit)
Byte 9 accumulation time byte 2
Byte 10 accumulation time byte 3
Byte 11 accumulation time byte MSB
Byte 12 Code version (BCD)
Bytes 13-256 0x0 (unused)

Pavel
0 Kudos
Message 3 of 4
(3,166 Views)
Pavel,

Do you receive any data back when you perform a read? In your example you have set byte count on your VISA Read to 1000. If you do not receive 1000 bytes back from your device you will experience a timeout. A better way to do this would be to use a VISA Property Node to return Number of bytes at Serial Port, and wire this to the byte count of the VISA Read.

Shawn B.
National Instruments
Use NI products on Linux? Come join the NI Linux Users Community
0 Kudos
Message 4 of 4
(3,136 Views)