Month: July 2024
Why it shows“Not all channels support on-demand operations. Only clocked operations are allowed”when I use NI-DAQ to acquire data?
Hi, all,
When I want to use MATLAB (R2022b-academic use) to control NI-USB 4431 to acquire data, the command window shows "Not all channels support on-demand operations. Only clocked operations are allowed." What does this mean? I can’t figure out how to solve it (I have installed NI-DAQmx toolbox, version 22.2.0). Here is the code:
dq = daq("ni");
dq.Rate = 8000;
ch1 = addinput(dq, d.DeviceID, "ai1", "Voltage");
tabledata = read(dq)
In addition, the NI-4431 device information is as follows.
ni: National Instruments(TM) USB-4431 (Device ID: ‘Dev1’)
Analog input supports:
-10 to +10 Volts range
Rates from 1000.0 to 102400.0 scansc
4 channels (‘ai0′,’ai1′,’ai2′,’ai3’)
‘Voltage’,’Accelerometer’,’Microphone’,’IEPE’ measurement types
Analog output supports:
-3.5 to +3.5 Volts range
Rates from 800.0 to 96000.0 scansc
1 channel (‘ao0’)
‘Voltage’ measurement type
Thanks!Hi, all,
When I want to use MATLAB (R2022b-academic use) to control NI-USB 4431 to acquire data, the command window shows "Not all channels support on-demand operations. Only clocked operations are allowed." What does this mean? I can’t figure out how to solve it (I have installed NI-DAQmx toolbox, version 22.2.0). Here is the code:
dq = daq("ni");
dq.Rate = 8000;
ch1 = addinput(dq, d.DeviceID, "ai1", "Voltage");
tabledata = read(dq)
In addition, the NI-4431 device information is as follows.
ni: National Instruments(TM) USB-4431 (Device ID: ‘Dev1’)
Analog input supports:
-10 to +10 Volts range
Rates from 1000.0 to 102400.0 scansc
4 channels (‘ai0′,’ai1′,’ai2′,’ai3’)
‘Voltage’,’Accelerometer’,’Microphone’,’IEPE’ measurement types
Analog output supports:
-3.5 to +3.5 Volts range
Rates from 800.0 to 96000.0 scansc
1 channel (‘ao0’)
‘Voltage’ measurement type
Thanks! Hi, all,
When I want to use MATLAB (R2022b-academic use) to control NI-USB 4431 to acquire data, the command window shows "Not all channels support on-demand operations. Only clocked operations are allowed." What does this mean? I can’t figure out how to solve it (I have installed NI-DAQmx toolbox, version 22.2.0). Here is the code:
dq = daq("ni");
dq.Rate = 8000;
ch1 = addinput(dq, d.DeviceID, "ai1", "Voltage");
tabledata = read(dq)
In addition, the NI-4431 device information is as follows.
ni: National Instruments(TM) USB-4431 (Device ID: ‘Dev1’)
Analog input supports:
-10 to +10 Volts range
Rates from 1000.0 to 102400.0 scansc
4 channels (‘ai0′,’ai1′,’ai2′,’ai3’)
‘Voltage’,’Accelerometer’,’Microphone’,’IEPE’ measurement types
Analog output supports:
-3.5 to +3.5 Volts range
Rates from 800.0 to 96000.0 scansc
1 channel (‘ao0’)
‘Voltage’ measurement type
Thanks! ni-daqmx, acquire data, addinput MATLAB Answers — New Questions
How to make directions bigger in current plot?
I am using the current command (https://es.mathworks.com/help/antenna/ref/cavity.current.html) to plot the current distribution of an antenna with the current direction. I want to include such a plot in my final project but the arrows that indicate the direction are too tiny to be seen in the figure. I am trying to configure the plot to make the lines thicker but I haven’t found how to do it.I am using the current command (https://es.mathworks.com/help/antenna/ref/cavity.current.html) to plot the current distribution of an antenna with the current direction. I want to include such a plot in my final project but the arrows that indicate the direction are too tiny to be seen in the figure. I am trying to configure the plot to make the lines thicker but I haven’t found how to do it. I am using the current command (https://es.mathworks.com/help/antenna/ref/cavity.current.html) to plot the current distribution of an antenna with the current direction. I want to include such a plot in my final project but the arrows that indicate the direction are too tiny to be seen in the figure. I am trying to configure the plot to make the lines thicker but I haven’t found how to do it. current, antennas, plot, quiver, plotting MATLAB Answers — New Questions
StackedPlot with separate events
I’d like to make a stacked plot with each plot showing different events (each plot’s own events only). How could I fix this code to show only the proper data’s corresponding events? (apologies for my clumsy coding)
%make timetable
times=[1, 2, 5]’;
s=seconds(times);
variable=[3, 4, 5]’;
T=table(s,variable);
TT=table2timetable(T);
%makes event table
EventTime = seconds(4);
lengths = seconds(1);
Events = eventtable(EventTime,EventLengths=lengths);
%Assign event table to time table
TT.Properties.Events=Events;
%make timetable
variable2=[6, 8, 9]’;
T2=table(s,variable2);
TT2=table2timetable(T2);
%makes event table
EventTime2 = seconds(1);
lengths2 = seconds(1);
Events2 = eventtable(EventTime2,EventLengths=lengths2);
%Assign event table2 to time table2
TT2.Properties.Events=Events2;
stackedplot(TT,TT2)I’d like to make a stacked plot with each plot showing different events (each plot’s own events only). How could I fix this code to show only the proper data’s corresponding events? (apologies for my clumsy coding)
%make timetable
times=[1, 2, 5]’;
s=seconds(times);
variable=[3, 4, 5]’;
T=table(s,variable);
TT=table2timetable(T);
%makes event table
EventTime = seconds(4);
lengths = seconds(1);
Events = eventtable(EventTime,EventLengths=lengths);
%Assign event table to time table
TT.Properties.Events=Events;
%make timetable
variable2=[6, 8, 9]’;
T2=table(s,variable2);
TT2=table2timetable(T2);
%makes event table
EventTime2 = seconds(1);
lengths2 = seconds(1);
Events2 = eventtable(EventTime2,EventLengths=lengths2);
%Assign event table2 to time table2
TT2.Properties.Events=Events2;
stackedplot(TT,TT2) I’d like to make a stacked plot with each plot showing different events (each plot’s own events only). How could I fix this code to show only the proper data’s corresponding events? (apologies for my clumsy coding)
%make timetable
times=[1, 2, 5]’;
s=seconds(times);
variable=[3, 4, 5]’;
T=table(s,variable);
TT=table2timetable(T);
%makes event table
EventTime = seconds(4);
lengths = seconds(1);
Events = eventtable(EventTime,EventLengths=lengths);
%Assign event table to time table
TT.Properties.Events=Events;
%make timetable
variable2=[6, 8, 9]’;
T2=table(s,variable2);
TT2=table2timetable(T2);
%makes event table
EventTime2 = seconds(1);
lengths2 = seconds(1);
Events2 = eventtable(EventTime2,EventLengths=lengths2);
%Assign event table2 to time table2
TT2.Properties.Events=Events2;
stackedplot(TT,TT2) stackedplot, plotting MATLAB Answers — New Questions
App Designer and Simulink Interchange
Hi, i know it sounds a bit crazy but I want to interact between app designer and simulink.
I am working with Arduino Due, and I reahced where too many blocks in Simulink is causing some issue.
Now my approach is to read the CAN via Simulink and read that live CAN message then manipulate it within App designer.
Also, use App designer to manipulate the Arduino’s I/Os.
The problem I am having is once the Simulink is connected to Arduino, I do not see any options that I can work with the Arduino’s I/Os. Unless I have the Arduino blocks within the simlink that has constant block to it which can be manipulate within app designer. However, this case will not reduece the Simulink information that embedded to the Arduino.
Any ideas where I can reduce the Simulink and somehow work with Arduino at the same time?
I tried to read the CAN message via app designer, it crashed (this would be the ideal option but some reason it isn’t working for me 🙁
Thanks!Hi, i know it sounds a bit crazy but I want to interact between app designer and simulink.
I am working with Arduino Due, and I reahced where too many blocks in Simulink is causing some issue.
Now my approach is to read the CAN via Simulink and read that live CAN message then manipulate it within App designer.
Also, use App designer to manipulate the Arduino’s I/Os.
The problem I am having is once the Simulink is connected to Arduino, I do not see any options that I can work with the Arduino’s I/Os. Unless I have the Arduino blocks within the simlink that has constant block to it which can be manipulate within app designer. However, this case will not reduece the Simulink information that embedded to the Arduino.
Any ideas where I can reduce the Simulink and somehow work with Arduino at the same time?
I tried to read the CAN message via app designer, it crashed (this would be the ideal option but some reason it isn’t working for me 🙁
Thanks! Hi, i know it sounds a bit crazy but I want to interact between app designer and simulink.
I am working with Arduino Due, and I reahced where too many blocks in Simulink is causing some issue.
Now my approach is to read the CAN via Simulink and read that live CAN message then manipulate it within App designer.
Also, use App designer to manipulate the Arduino’s I/Os.
The problem I am having is once the Simulink is connected to Arduino, I do not see any options that I can work with the Arduino’s I/Os. Unless I have the Arduino blocks within the simlink that has constant block to it which can be manipulate within app designer. However, this case will not reduece the Simulink information that embedded to the Arduino.
Any ideas where I can reduce the Simulink and somehow work with Arduino at the same time?
I tried to read the CAN message via app designer, it crashed (this would be the ideal option but some reason it isn’t working for me 🙁
Thanks! arduino, appdesigner, simulink, canbus MATLAB Answers — New Questions
Locking editing file?
Is the only way to lock editing a file, to go to the manage access dialog. and change each person to can view?
or is there a simple property to set read only?
thanks
Is the only way to lock editing a file, to go to the manage access dialog. and change each person to can view?or is there a simple property to set read only?thanks Read More
Auto-Converting Input
Hi I’m working on an hours log excel sheet
I need to have a column where someone can enter 20 (as in 20mins) and it will automatically be divided by 60 and represented as a decimal so that the sheet can then add these up and calculate hourly pay.
Could someone please tell me how to make that happen?
Hi I’m working on an hours log excel sheet I need to have a column where someone can enter 20 (as in 20mins) and it will automatically be divided by 60 and represented as a decimal so that the sheet can then add these up and calculate hourly pay.Could someone please tell me how to make that happen? Read More
updateDeviceProfileAssignment returning 200 OK and not 204 No Content
Recently there has been a change and I cannot find what may have changed.
The following issue I am having is that when trying to change the enrollment profile of an iOS device using .net and httpclient, I am getting back a 200 response with an empty object. I have tried both in my code and with in Graph Explorer. Just last week I was getting a response 204
https://graph.microsoft.com/beta/deviceManagement/depOnboardingSettings/{####}/enrollmentProfiles/{####}/updateDeviceProfileAssignment
{
“deviceIds”: [
“serialNumber”
]
}
Headers:
Authorization: Bearer {token}
Accept: application/json
Permissions Granted:
DeviceManagementServiceConfig.ReadWrite.All,
DeviceManagementConfiguration.ReadWrite.All
Here is the response:
200 OK
Preview:
{}
Headers:
{
“client-request-id”: “38ed1c72-7704-77f2-a979-cba9cc8a30ce”,
“content-length”: “0”,
“request-id”: “889d6054-4721-43ed-94e6-de8b636bb524”
}
The response should be a 204 and the profile should be changed. What am I missing? Getting the response of 200 at least means the call is working, but it’s not adding the profile to the device. I assume that if that if the profile is added, then I would get the 204 response.
Recently there has been a change and I cannot find what may have changed. The following issue I am having is that when trying to change the enrollment profile of an iOS device using .net and httpclient, I am getting back a 200 response with an empty object. I have tried both in my code and with in Graph Explorer. Just last week I was getting a response 204 https://graph.microsoft.com/beta/deviceManagement/depOnboardingSettings/{####}/enrollmentProfiles/{####}/updateDeviceProfileAssignment
{
“deviceIds”: [
“serialNumber”
]
}
Headers:
Authorization: Bearer {token}
Accept: application/json
Permissions Granted:
DeviceManagementServiceConfig.ReadWrite.All,
DeviceManagementConfiguration.ReadWrite.All
Here is the response:200 OK
Preview:
{}
Headers:
{
“client-request-id”: “38ed1c72-7704-77f2-a979-cba9cc8a30ce”,
“content-length”: “0”,
“request-id”: “889d6054-4721-43ed-94e6-de8b636bb524”
}
The response should be a 204 and the profile should be changed. What am I missing? Getting the response of 200 at least means the call is working, but it’s not adding the profile to the device. I assume that if that if the profile is added, then I would get the 204 response. Read More
Quarter and Years grouping and Pivot fields disappeared ?
After the latest update (?), my existing pivots suddenly no longer have the “Quarter” and “Years” fields in the field list. When the pivots were created this grouping and the fields were created automatically.
The issue is that when I now do a Refresh-all (CTRL-Alt-F5) with existing data (without having added any new data), it all fails and the grouping is no longer there. I have tried to create a new Pivot with “Group” in Pivot Table Analysis, obviously using the same data tab as before, but this also doesn´t allow the grouping in Years / Quarters / Months – ref my attachments.
NB!
When I extract a new data set from the same source using CSV and directly in the opened CSV file – it all works beautifully, using the CSV file directly. The grouping in both columns and rows are automatically added to the field list – and it just works.
BUT when I use the exact same data set in my existing file, not only will the existing pivots fail (no groupings) but also creating a completely new pivot produces the inability to group both columns and rows.
It seems to be a problem in (my) excel, since CSV handles it perfectly ? Can anyone help with either a way to update the existing pivots (preferred :)) or at least a way to create this type of grouping in new pivots ?
After the latest update (?), my existing pivots suddenly no longer have the “Quarter” and “Years” fields in the field list. When the pivots were created this grouping and the fields were created automatically. The issue is that when I now do a Refresh-all (CTRL-Alt-F5) with existing data (without having added any new data), it all fails and the grouping is no longer there. I have tried to create a new Pivot with “Group” in Pivot Table Analysis, obviously using the same data tab as before, but this also doesn´t allow the grouping in Years / Quarters / Months – ref my attachments. NB!When I extract a new data set from the same source using CSV and directly in the opened CSV file – it all works beautifully, using the CSV file directly. The grouping in both columns and rows are automatically added to the field list – and it just works. BUT when I use the exact same data set in my existing file, not only will the existing pivots fail (no groupings) but also creating a completely new pivot produces the inability to group both columns and rows. It seems to be a problem in (my) excel, since CSV handles it perfectly ? Can anyone help with either a way to update the existing pivots (preferred :)) or at least a way to create this type of grouping in new pivots ? Read More
‘Update your sign-in technology before September 16th, 2024 to maintain email access’.
Hi I received this message :
“The safety and security of your information is top priority for Microsoft. To help keep your account secure, Microsoft will no longer support the use of third-party email and calendar apps which ask you to sign in with only your Microsoft Account username and password. To keep you safe you will need to use a mail or calendar app which supports Microsoft’s modern authentication methods. If you do not act, your third-party email apps will no longer be able to access your Outlook.com, Hotmail or Live.com email address on September 16th”.
I am trying to work out how to rectify the issue but am really confused. If anyone could help I would be really grateful. My email is a live.co.uk account and I just click on the blue mail envelope to access it from my laptop/phone etc. Do I need to have an entirely new account or is there way to keep this account but update it as the email I think suggests? Many thanks in advance.
Hi I received this message :”The safety and security of your information is top priority for Microsoft. To help keep your account secure, Microsoft will no longer support the use of third-party email and calendar apps which ask you to sign in with only your Microsoft Account username and password. To keep you safe you will need to use a mail or calendar app which supports Microsoft’s modern authentication methods. If you do not act, your third-party email apps will no longer be able to access your Outlook.com, Hotmail or Live.com email address on September 16th”.I am trying to work out how to rectify the issue but am really confused. If anyone could help I would be really grateful. My email is a live.co.uk account and I just click on the blue mail envelope to access it from my laptop/phone etc. Do I need to have an entirely new account or is there way to keep this account but update it as the email I think suggests? Many thanks in advance. Read More
Plotting path of rods on a circular disk along a surface to deduce rack gear profile.
I am trying to design a custom rack gear similar to ones used in a rack and pinion gear system. Instead of a pinion i am using a disk with 4 rods equally spaced on the disk that almost act as the teeth. I want to be able to plot the path of the rods as the disk rotates over a flat surface by simulating the movement. With this path I can design the rack.I am trying to design a custom rack gear similar to ones used in a rack and pinion gear system. Instead of a pinion i am using a disk with 4 rods equally spaced on the disk that almost act as the teeth. I want to be able to plot the path of the rods as the disk rotates over a flat surface by simulating the movement. With this path I can design the rack. I am trying to design a custom rack gear similar to ones used in a rack and pinion gear system. Instead of a pinion i am using a disk with 4 rods equally spaced on the disk that almost act as the teeth. I want to be able to plot the path of the rods as the disk rotates over a flat surface by simulating the movement. With this path I can design the rack. path simulation, location plot, gears MATLAB Answers — New Questions
New outlook spelling editor: Extremely unintuitive UX
The feature:
Problem: When the suggestion box pops up, the box prevents the user from editing the text. Any keyboard input is then redirected to the inbox.
What this means: If you click on the misspelled word and hit “backspace”, instead of editing text, it starts deleting emails.
What we want: For the text to be editable while the suggestion box pops up, like any other text editing software including your own microsoft word.
The feature: Problem: When the suggestion box pops up, the box prevents the user from editing the text. Any keyboard input is then redirected to the inbox. What this means: If you click on the misspelled word and hit “backspace”, instead of editing text, it starts deleting emails. What we want: For the text to be editable while the suggestion box pops up, like any other text editing software including your own microsoft word. Read More
Search for most recent date in a list
I’m trying to search a massive list of data for the most recent transaction date for a specific region and then return said date to a cell. I’m sure I’m overcomplicating things but does anyone know what sort of formula I should be using. I have attached some screenshots for some added info. Thanks
I’m trying to search a massive list of data for the most recent transaction date for a specific region and then return said date to a cell. I’m sure I’m overcomplicating things but does anyone know what sort of formula I should be using. I have attached some screenshots for some added info. Thanks Read More
Sharing files to a mail@ or contact@ email address
Does SharePoint allow sharing files to a mail@ or contact@ email address? have a user who can’t access who is using a mail@ email address so am going to suggest creating a new email address
Does SharePoint allow sharing files to a mail@ or contact@ email address? have a user who can’t access who is using a mail@ email address so am going to suggest creating a new email address Read More
Cloudflare Data Connector for GCC High
Looking for some feedback to see if there are plans to add Cloudflare to the list of data connectors in the content hub for GCC and GCC High? I do not see it but I do see it in the commerical tenatn.
Looking for some feedback to see if there are plans to add Cloudflare to the list of data connectors in the content hub for GCC and GCC High? I do not see it but I do see it in the commerical tenatn. Read More
latest value in a series of values.
I want to go from Table 1 to Table 2 using pivot table or other automatic ways to summarize information.
What is a good way to accomplish this? I would like to do this in a way that is easy to understand for non-technical people to follow (i.e. no installations of additional tools, or coding if possible!)
Table 1 Table 2 CountryStateRatingAgencyDate CountryStateRatingDateUSGA1A12020-01-01 USGA12020-01-01USGA2A12019-01-01 USAL22023-01-01USAL2A12023-01-01 USAL2A22022-01-01 USAL3A12021-01-01
I want to go from Table 1 to Table 2 using pivot table or other automatic ways to summarize information.What is a good way to accomplish this? I would like to do this in a way that is easy to understand for non-technical people to follow (i.e. no installations of additional tools, or coding if possible!) Table 1 Table 2 CountryStateRatingAgencyDate CountryStateRatingDateUSGA1A12020-01-01 USGA12020-01-01USGA2A12019-01-01 USAL22023-01-01USAL2A12023-01-01 USAL2A22022-01-01 USAL3A12021-01-01 Read More
third party Extensions are getting turned off by edge
i have installed extensions which is only available in chrome but not in edge and made it not uninstallable using registry edit using policy “ExtensionInstallForcelist” but when i am closing the edge with task manage by end task. and again turning on the edge i see the extensions get turned off even i have allowed the “Allow extensions from other stores” please fix this issue due to this i am able to bypass the adult blocker extension many people also reported this https://drive.google.com/file/d/1I8-coZr9WnIoovO4xiF7BxICMoYYMSU4/view?usp=drivesdk
Edge keeps turning off my Chrome extensions – Microsoft Community also many people reported this issue in forum you can see
i have installed extensions which is only available in chrome but not in edge and made it not uninstallable using registry edit using policy “ExtensionInstallForcelist” but when i am closing the edge with task manage by end task. and again turning on the edge i see the extensions get turned off even i have allowed the “Allow extensions from other stores” please fix this issue due to this i am able to bypass the adult blocker extension many people also reported this https://drive.google.com/file/d/1I8-coZr9WnIoovO4xiF7BxICMoYYMSU4/view?usp=drivesdk Edge keeps turning off my Chrome extensions – Microsoft Community also many people reported this issue in forum you can see Read More
More Performance + AI Integration | Azure Database for MySQL - Flexible Server
Bring your MySQL workloads to run on Azure. Azure Database for MySQL — Flexible Server offers a powerful, fully managed solution for MySQL workloads, providing unique platform-level optimizations that significantly enhance connection scaling and cost performance. Ensure high efficiency and reduced latency for mission-critical applications for up to twice the performance of other offerings. The integration with Azure OpenAI Service and Azure AI Search further extends its capabilities, enabling intelligent vector-based search and generative AI responses for more accurate and relevant user queries.
Join Parikshit Savjani, Azure Database for MySQL Principal Group PM, shares how Azure Database for MySQL — Flexible Server transforms traditional MySQL applications into high-performance, intelligent systems by combining the scalability and security of Azure with advanced AI-driven insights.
Run MySQL on Azure.
A fully managed service with unique optimizations — doubling performance, and enabling AI-driven search and responses. See it here.
Redirect transaction logging to high-speed SSDs.
Higher throughput, reduced latency, & higher cost efficiency during traffic spikes. Check it out.
Enable semantic search in Azure Database for MySQL.
Relevant and intelligent search results with Azure AI Search and OpenAI services. Take a look.
Watch our video here:
QUICK LINKS:
00:00 — Run MySQL on Azure
00:56 — Run your LAMP stack on Azure
01:24 — Accelerated Logs capability
03:02 — Vector-based search and generative AI
04:02 — Leverage Azure AI Search & Azure OpenAI services
04:29 — Establish database connection
05:52 — Build vector index
07:04 — Create an Indexer
07:32 — Semantic Search
07:54 — Test it in the Azure AI playground
08:49 — Wrap up
Link References
Check out https://aka.ms/mysql-resources
Join the community for Azure Database for MySQL at https://aka.ms/mysql-contributors
Unfamiliar with Microsoft Mechanics?
As Microsoft’s official video series for IT, you can watch and share valuable content and demos of current and upcoming tech from the people who build it at Microsoft.
Subscribe to our YouTube: https://www.youtube.com/c/MicrosoftMechanicsSeries
Talk with other IT Pros, join us on the Microsoft Tech Community: https://techcommunity.microsoft.com/t5/microsoft-mechanics-blog/bg-p/MicrosoftMechanicsBlog
Watch or listen from anywhere, subscribe to our podcast: https://microsoftmechanics.libsyn.com/podcast
Keep getting this insider knowledge, join us on social:
Follow us on Twitter: https://twitter.com/MSFTMechanics
Share knowledge on LinkedIn: https://www.linkedin.com/company/microsoft-mechanics/
Enjoy us on Instagram: https://www.instagram.com/msftmechanics/
Loosen up with us on TikTok: https://www.tiktok.com/@msftmechanics
Video Transcript:
-If MySQL is your app data tier of choice, you will want to run it on Azure. In the next few minutes, I’ll show you how Azure Database for MySQL Flexible Server, as a fully-managed service, builds on top of the community-driven MySQL to provide unique platform-level optimizations where, for example, using the new Accelerated Logs capability, you can significantly improve connection scaling and cost performance for your web apps, with up to twice performance compared to other offerings.
-Or you can combine Azure Database for MySQL with Azure AI Search and Azure Open AI Service to light up intelligent vector search for natural language querying and generative AI responses, with your existing web and e-commerce apps, all while operating on an enterprise-grade foundation of advanced platform-level security and resiliency across Azure’s global network backbone, and taking advantage of built-in AI-powered technical guidance with Copilot in Azure. Microsoft, in fact, is a major open-source contributor, and as an open platform, you can run your entire LAMP stack on Azure.
-This is literally pure MySQL on Azure, with community updates implemented within months of being available for a high level of compatibility and extension support, with a few added advantages, where we give you platform-level optimizations for your workloads running on Azure.
-For example, here I’ve deployed the LAMP base Magento framework for my e-commerce app, and with our new Accelerated Logs capability in the Business Critical Service Tier of Azure Database for MySQL Flexible Server, I’m going to show you how we built on top of MySQL’s robust scale-out architecture to improve cost performance with reduced latency for disk writes.
-This e-commerce app is prone to bursts of traffic whenever there is a specific promotion or event, and so I’m going to use the sysbench tool for around 300 seconds, 128 threads, 20 tables, and 20 million records per table to simulate high throughput traffic to the database and measure the number of transactions and queries per second.
-I’ll first run this test without Accelerated Log enabled, and you’ll see that measured throughput is around 4,500 transactions per second, 90,000 queries per second, and latency is around 51 milliseconds at the 95th percentile.
-Let’s now go back to the Azure portal to enable Accelerated Logs. And in sysbench, we’ll run the exact same test again and let the transactions process.
-Once it’s completed, you’ll see that we have doubled the throughput with 9,500 transactions per second versus 4,500 before, and 190,000 queries per second versus 90,000 before. And the response time is reduced by more than half with latency measured at 22 milliseconds at the 95th percentile versus 51 milliseconds before.
-We are able to achieve this through Azure’s platform-level optimizations, where under the covers, we keep regular data file IO operations where they are, but redirect IO-intensive transaction logging to higher speed SSDs for lower latency and higher performance.
-This ensures better responsiveness, higher throughput, and cost efficiency for your mission-critical workloads. Next, let’s make the same workload more intelligent with vector-based search and generative AI responses. This is the front end of my e-commerce app. Its search is keyword-based and that has limitations. You can see here I’m searching for a rain jacket for women, and because it’s searching on jacket as a keyword, not only is it returning the result for women’s jacket, but also for men, and not all jackets are necessarily rain jackets.
-Now, let me show you the same thing using semantic search with the responses returned using a custom generative AI experience. I’ll use natural language to type, “We live in Seattle and I’m looking for a rain jacket for my wife which is highly rated and recommended by other customers.”
-As you can see, the Magento Product Recommender Chat was able to interpret my requirements in natural language, perform semantic search from the product and reviews data stored in our backend MySQL database, and summarize the review results back to me to recommend the Inez Full-Zip Jacket.
-Let’s see what is happening on the backend. To support semantic search for our e-commerce app, we leverage Azure AI Search and Azure OpenAI services. Azure AI Search pulls the product and reviews data from the backend MySQL database for Magento, using an indexer that runs periodically. The reviews data is further chunked and vectorized using Azure OpenAI’s text embedding model. In Azure AI Search, the vectorized data is then persisted in a vector search index. In fact, let me show you how we implement this architecture in code.
-Here we use Python code in Jupyter Notebook to define, build, and refresh vector search index in Azure AI Search. And the first thing we need to do is establish our database connection. To do that, I’ve defined the connection strength for Azure Database for MySQL Flexible Server hosting Luma’s Magento e-commerce web database.
-Next, we need to connect to our Azure AI services that we’ll use to generate embeddings. Here I’ve entered the Azure OpenAI deployment details, including the API base, API key, and API type, which in this case is Azure. I’m using OpenAI’s text embedding ada-002 as the embedding model, with embedding size of 1,536 dimension, and the GPT-4 large language model. Now I have the connections in place to start building a vector index.
-I’ll use the service endpoint for Azure AI Search. Here I’ve defined the search key, the service endpoint details, and my index name that I’ll use later. Now, I need to define the query that the AI search will use to populate the vector index. In this case, because the products and customer reviews data are stored in separate tables in the Magento MySQL database, I’ve defined a single-view abstraction name, product_review_data_all in the database. This joins the product and reviews table to pull all the products information with their respective reviews.
-Now, I can complete the configuration of the vector index that I named earlier. Because customer review text strings can be quite long and span multiple themes, we need to break those into smaller pieces or chunks so that each main theme in any given review gets its own unique vector embedding. I’ve done that here, and each chunk will get a new row. This is represented by a unique review ID field. Below that, I’ve added seven additional parent fields to each new row to provide more context. We’ll define the process that splits the review text into chunks in a moment.
-For the vector index itself, I’ve used Hierarchical Navigable Small World, or HNSW graphs, which is one of the most popular algorithms for similarity search. I’ve defined the HNSW parameters here, and I’ve defined the connection settings for the VectorSearchProfile and vectorizers that I’ll use in a moment.
-Now, for the vector index, I’ve defined the search types. Here I’m using vector search as well as semantic search, which together produce what’s called hybrid search. It means you can search using keywords or natural language descriptions.
-So I’ll go ahead and run it. Once it completes, you’ll see our Magento review index is now created. Next, we create an indexer that will pull the product reviews data from our MySQL database, split those into chunks, generate the vectors for each chunk, and write those to the search index.
-Here we are using two pre-built skillsets. the Split Skill generates chunks from each review. Azure OpenAI’s Embedding Skill then uses those chunks to generate the vector embedding values for the index. Now we can run everything to insert the vector data into our vector index. Our Azure AI Search service is now ready for semantic search queries. In fact, I can try this out from the notebook.
-I’ll execute a semantic search query, “suggest me some rain jackets for women,” against our vector search index, and you’ll see the same results that we saw before in our web app. The Inez Full-Zip Jacket comes with the highest semantic search score and is our top result. And with our index running, we can also try this out in the Azure AI studio playground. To do that, I’ll just need to connect it to my search index. From setup, in the Add Your Data tab, I’ll add my data source. In this case, it’s the Azure AI Search type we just created. Then I need to select my index. I’ll enable the vector search option and then use the ada-002 embedding model.
-I’ll keep the search type as hybrid plus semantic, and that’s it. From here, we are ready to start configuring the GenAI experience in the chat playground. Using the system message, I can instruct the OpenAI GPT-4 model to behave as a product recommender assistant. Now, to test it out, I’ll paste in the same query from before and run it. Then as it completes, you’ll see the Inez Full-Zip Jacket shows up as the top recommended rain jacket, along with a brief summary of the reviews. Now with everything tested, we are ready to run it in production, like you saw on our website earlier.
-So that was an overview of the unique advantages of bringing your MySQL workloads on Azure, from its performance optimizations, to how you can extend it with Azure AI services. To learn more, please check out aka.ms/mysql-resources. And you can join the community for Azure Database for MySQL at aka.ms/mysql-contributors. And keep watching Microsoft Mechanics for the latest tech updates. Thanks for watching.
Microsoft Tech Community – Latest Blogs –Read More
Introducing new troubleshooting guides features
We are excited to announce the release of new features aimed at enhancing the troubleshooting experience in Azure PostgreSQL Flexible Server. These features provide detailed insights and metrics, enabling you to optimize your database performance effectively.
Here are the use cases where these features can be used:
Enhancements to autovacuum monitoring:
One of the significant enhancements is the addition of table-level autovacuum details. This feature allows you to:
Monitor the number of times autovacuum ran.
Check the number of dead tuples cleaned or not removed.
Track the time taken to run the autovacuum.
Furthermore, we now display the configuration of some important parameters which control autovacuum. We validate some of those parameters and warn you if we consider that the existing configuration might cause issues with the correct functioning of autovacuum. We have also added a new Enhanced metrics tab which displays the Maximum number of Transaction IDs in use and the Oldest backend XMin metrics to provide a comprehensive view of autovacuum health.
Enhancements to the CPU troubleshooting guide:
To help you manage high CPU usage, we have introduced several new features:
Parameter check for excessive logging that might impact the CPU usage and overall server performance.
New “Top queries by total duration” tab which displays Query Store queries with total time.
New insight card showing sessions whose state is idle and have an open transaction.
New tab to showcase PgBouncer metrics and best practices:
A new tab to display the locking information: In this section, you can get the overview of locks in your server.
You can get the count of sessions involved in Locks.
You can monitor the acquired locks duration during the specified time.
You can also get insights on blocking session where sessions are still waiting for lock acquisition.
Enhancements to the memory troubleshooting guide:
For troubleshooting high memory usage, we have added validation for memory parameters where it can show you an insight when you change these parameters higher than defaults.
We have also introduced an insight for long (>24hrs) idle sessions that might consume server resources.
We believe these new features will significantly enhance your ability to troubleshoot and optimize your Azure PostgreSQL Flexible Server. We look forward to your feedback!
Getting started:
To learn more about the troubleshooting guides, visit our documentation below:
What are the troubleshooting guides in Azure Database for PostgreSQL Flexible Server
How to use the troubleshooting guides for Azure Database for PostgreSQL Flexible Server
Microsoft Tech Community – Latest Blogs –Read More
There was an error loading the library
Dear all,
I put the compiled dll file (written in C) in ‘C:Program FilesMATLABR2011bexterninclude
I have a problem when I tried to load the library using the following command:
hfile = [matlabroot ‘externincludedllspinapi.h’];
loadlibrary(‘spinapi’, hfile)
it gave me the following error message:
Error using loadlibrary (line 421)
There was an error loading the library "spinapi"
The specified module could not be found.
Caused by:
Error using loaddefinedlibrary
The specified module could not be found.
My operating system is 64bit Win7, matlab is 64bit version, compiler is Microsoft Software Development Kit (SDK) 7.1, which is recommended in http://www.mathworks.com/support/compilers/R2011b/win64.html
Does anyone know what the problem is? I almost tried every method that I could find in google. But they didn’t help. I am so deperated……
One thing made me very confused was that, I did exactly the same in my old computer, its operating system is 32bit Windows XP, matlab is R2009a 32bit version, compiler is lcc-win32 C, and it could load the library without any error!!!
I will be very thankful to anyone who can help me.
Best Regards,
KitDear all,
I put the compiled dll file (written in C) in ‘C:Program FilesMATLABR2011bexterninclude
I have a problem when I tried to load the library using the following command:
hfile = [matlabroot ‘externincludedllspinapi.h’];
loadlibrary(‘spinapi’, hfile)
it gave me the following error message:
Error using loadlibrary (line 421)
There was an error loading the library "spinapi"
The specified module could not be found.
Caused by:
Error using loaddefinedlibrary
The specified module could not be found.
My operating system is 64bit Win7, matlab is 64bit version, compiler is Microsoft Software Development Kit (SDK) 7.1, which is recommended in http://www.mathworks.com/support/compilers/R2011b/win64.html
Does anyone know what the problem is? I almost tried every method that I could find in google. But they didn’t help. I am so deperated……
One thing made me very confused was that, I did exactly the same in my old computer, its operating system is 32bit Windows XP, matlab is R2009a 32bit version, compiler is lcc-win32 C, and it could load the library without any error!!!
I will be very thankful to anyone who can help me.
Best Regards,
Kit Dear all,
I put the compiled dll file (written in C) in ‘C:Program FilesMATLABR2011bexterninclude
I have a problem when I tried to load the library using the following command:
hfile = [matlabroot ‘externincludedllspinapi.h’];
loadlibrary(‘spinapi’, hfile)
it gave me the following error message:
Error using loadlibrary (line 421)
There was an error loading the library "spinapi"
The specified module could not be found.
Caused by:
Error using loaddefinedlibrary
The specified module could not be found.
My operating system is 64bit Win7, matlab is 64bit version, compiler is Microsoft Software Development Kit (SDK) 7.1, which is recommended in http://www.mathworks.com/support/compilers/R2011b/win64.html
Does anyone know what the problem is? I almost tried every method that I could find in google. But they didn’t help. I am so deperated……
One thing made me very confused was that, I did exactly the same in my old computer, its operating system is 32bit Windows XP, matlab is R2009a 32bit version, compiler is lcc-win32 C, and it could load the library without any error!!!
I will be very thankful to anyone who can help me.
Best Regards,
Kit loading the library, specified module could not be found MATLAB Answers — New Questions