LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW serial DF1

I am attempting to send serial read and write commands to a MicroLogix 1000 plc using Df1 communication protocols. In the Vi that I attached the goal is the write to the N7:0 element. Because i am new to labview, essentially what i have done is attempt to replicate code that I know works in the Microsoft Visual Studio environment. I have Built the Byte array, and in visual studios i would use (system.io.port.serialport.write(byte[]) to send the array. I have noticed that the visa serial block only takes strings. is there a command I am missing that can write an array, or is there a formatting issue that i missing? Any assistance would be greatly appreciated.

0 Kudos
Message 1 of 3
(1,899 Views)

An array of U8's is the same thing as a string.  They are both a series of bytes.

 

Use "Byte Array to String" found under the string palette.

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

Message 2 of 3
(1,857 Views)

I just had a chance to get back to this. Thank you for your prompt response by the way. I had attempted to use the "Byte Array to String" command and had no luck. It turned out that my CRC checking was incorrect which is why it didn't work. Thanks again.

0 Kudos
Message 3 of 3
(1,766 Views)