LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string subset with binary string

Solved!
Go to solution

Hi,

 

for a Visca cam command I have to convert a numeric input into a string in hex display mode. Then I need the string subset and put a "0" in front of each single number from the string.    e.g. numeric input is 100, the string in hex display mode shows 0064. From this I need to have 00000604. But the string subset function divides 0064 into 00 and 64. How can I put a"0" in front of each single number? Is there any function I can do this?

 

Thanks for help

 

Mark

0 Kudos
Message 1 of 6
(3,608 Views)
Solution
Accepted by topic author m4rk

Hi Mark,

 

here's an example:

Example_VI.png

The "split number" can be replaced by Q&R too...

Basically you have to split your number into nibbles (aka half-bytes). Doing this arithmetically is somewhat easier than to split strings to insert zeros before each char.

Message Edited by GerdW on 07-27-2009 11:20 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 6
(3,604 Views)
Thanks it works great!!
0 Kudos
Message 3 of 6
(3,589 Views)

Hi Mark & Gerd,

 

sorry i'm very new in program with labview 😞

I try to connect an visca cam with labview and send a hex code like you. 

But i have a problem, i didn't found a vi to connect the cam

could u help me pls?

 

thx a lot

dietmar

0 Kudos
Message 4 of 6
(3,457 Views)

Hi Dietmar,

 

for connecting the cam you would rather need a cable than a VI Smiley Wink

 

How do you want to access the cam? Which driver? Which supplier? Did you ask their support?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 6
(3,455 Views)

Hey Gerd,

 

first thx for the fast answer,

shure i need a cable to connect the cam Smiley Happy

 

the cam is connected with a usb-cabel,

shure i ask the support, the told me that the cam use the visca protokoll for communication

and send me a technical manuel about the sony fcb-PV 480

 

i will use the maxxvision Vision-480-usb

http://www.maxxvision.com/de/products/VisualCommunication/USB-Zoom/Vision%20480-USB/product.html

 

about the driver, see the screen shot pls

driver maxxvision.GIF

 

 

best regards

 

dietmar

 

by the way - my you speak german?

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